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

Edward Wang git at videolan.org
Mon Mar 26 18:47:39 CEST 2012


vlc | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sun Mar 25 01:17:03 2012 -0400| [9340c4daa66dc15d40eec98535977338e150c5b1] | committer: Jean-Baptiste Kempf

Qt4: Account for rare case when video loads too quickly

Close #6481

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 );



More information about the vlc-commits mailing list