[vlc-commits] qt: Fix crash when switching to fullscreen with video undocked
Hugo Beauzée-Luyssen
git at videolan.org
Fri Jan 19 17:14:21 CET 2018
vlc/vlc-3.0 | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Jan 19 17:05:09 2018 +0100| [d79907a5e1da092cb9ae271cba7673262ff878bf] | committer: Hugo Beauzée-Luyssen
qt: Fix crash when switching to fullscreen with video undocked
Fix #19503
(cherry picked from commit 78e2351cb5ccfb0c8a4e431f19d3b79a1e67175b)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=d79907a5e1da092cb9ae271cba7673262ff878bf
---
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 ) )
More information about the vlc-commits
mailing list