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

Edward Wang git at videolan.org
Mon Mar 26 18:48:37 CEST 2012


vlc/vlc-2.0 | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sun Mar 25 01:17:03 2012 -0400| [3305c6a100357989734a51ec3039cbce8f3287d1] | 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>
(cherry picked from commit 9340c4daa66dc15d40eec98535977338e150c5b1)

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

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

 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 1230404..0bcbaf2 100644
--- a/modules/gui/qt4/main_interface.cpp
+++ b/modules/gui/qt4/main_interface.cpp
@@ -553,7 +553,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