vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Fri Jan 19 
17:05:09 2018 +0100| [78e2351cb5ccfb0c8a4e431f19d3b79a1e67175b] | committer: 
Hugo Beauzée-Luyssen

qt: Fix crash when switching to fullscreen with video undocked

Fix #19503

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=78e2351cb5ccfb0c8a4e431f19d3b79a1e67175b
---

 modules/gui/qt/components/controller.cpp | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/components/controller.cpp 
b/modules/gui/qt/components/controller.cpp
index 1b91019729..e679206df8 100644
--- a/modules/gui/qt/components/controller.cpp
+++ b/modules/gui/qt/components/controller.cpp
@@ -877,12 +877,16 @@ void FullscreenControllerWidget::restoreFSC()
             return;
 
         QRect currentRes = QApplication::desktop()->screenGeometry( 
targetScreen() );
+        QWindow *wh = windowHandle();
+        if ( wh != Q_NULLPTR )
+        {
 #ifdef QT5_HAS_WAYLAND
-        if ( !b_hasWayland )
-            
windowHandle()->setScreen(QGuiApplication::screens()[targetScreen()]);
+            if ( !b_hasWayland )
+                wh->setScreen(QGuiApplication::screens()[targetScreen()]);
 #else
-        windowHandle()->setScreen(QGuiApplication::screens()[targetScreen()]);
+            wh->setScreen(QGuiApplication::screens()[targetScreen()]);
 #endif
+        }
 
         if( currentRes == screenRes &&
             QApplication::desktop()->screen()->geometry().contains( 
previousPosition, true ) )

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to