[vlc-commits] qt: protect against invalid Qsize

Erwan Tulou git at videolan.org
Tue Jun 12 11:22:26 CEST 2018


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Tue Jun 12 10:48:52 2018 +0200| [d8d3d1efd3362b5ca88d47a46e7e2508e206d336] | committer: Erwan Tulou

qt: protect against invalid Qsize

This partially reverts commit 5ea9b98e29b518dadfc10e710eaa18f2c42468e9.

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

 modules/gui/qt/main_interface.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/gui/qt/main_interface.cpp b/modules/gui/qt/main_interface.cpp
index d14ae32b74..8b87e29e8f 100644
--- a/modules/gui/qt/main_interface.cpp
+++ b/modules/gui/qt/main_interface.cpp
@@ -678,6 +678,12 @@ inline void MainInterface::showTab( QWidget *widget, bool video_closing )
     }
 
     stackCentralW->setCurrentWidget( widget );
+    if( b_autoresize )
+    {
+        QSize size = stackWidgetsSizes[widget];
+        if( size.isValid() )
+            resizeStack( size.width(), size.height() );
+    }
 
 #ifdef DEBUG_INTF
     msg_Dbg( p_intf, "Stack state changed to %s, index %i",



More information about the vlc-commits mailing list