[vlc-devel] [PATCH] Qt4: Account for rare case when video loads too quickly

Edward Wang edward.c.wang at compdigitec.com
Sun Mar 25 07:17:03 CEST 2012


Close #6481
---
 Theoretical fix that should work, but I couldn't get the video to load before the interface...

 modules/gui/qt4/main_interface.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/modules/gui/qt4/main_interface.cpp b/modules/gui/qt4/main_interface.cpp
index 7a72362..8d952d2 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -556,7 +556,9 @@ inline void MainInterface::showTab( QWidget *widget )
         /* Embedded playlist -> Non-embedded playlist */
         if( bgWidget == stackCentralOldWidget && widget == videoWidget )
         {
-            playlistWidget->artContainer->removeWidget( videoWidget );
+            /* In rare case when video is started before the interface */
+            if( playlistWidget != NULL )
+                playlistWidget->artContainer->removeWidget( videoWidget );
             videoWidget->show(); videoWidget->raise();
             stackCentralW->addWidget( videoWidget );
             stackCentralW->setCurrentWidget( videoWidget );
-- 
1.7.5.4




More information about the vlc-devel mailing list