[vlc-commits] commit: qt4: remove an assert (a check for NULLity is enough). ( Rémi Duraffort )
    git at videolan.org 
    git at videolan.org
       
    Fri Nov 19 11:19:46 CET 2010
    
    
  
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Nov 19 10:51:07 2010 +0100| [d811e20b7a73233cc0669e0e53b88cdb1296e7ee] | committer: Rémi Duraffort 
qt4: remove an assert (a check for NULLity is enough).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d811e20b7a73233cc0669e0e53b88cdb1296e7ee
---
 modules/gui/qt4/components/interface_widgets.cpp |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index e6ea283..c0d6748 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -171,10 +171,12 @@ void VideoWidget::release( void )
 {
     msg_Dbg( p_intf, "Video is not needed anymore" );
 
-    assert( stable );
-    layout->removeWidget( stable );
-    stable->deleteLater();
-    stable = NULL;
+    if( stable )
+    {
+        layout->removeWidget( stable );
+        stable->deleteLater();
+        stable = NULL;
+    }
 
     updateGeometry();
 }
    
    
More information about the vlc-commits
mailing list