[vlc-devel] commit: Qt: menus fix. Close #2423, #2420, #2419, and #2422. ( Jean-Baptiste Kempf )

git version control git at videolan.org
Wed Jan 21 22:49:53 CET 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Jan 21 22:48:16 2009 +0100| [ab82b0325d22dfdad12ef107f78db34dd302dc61] | committer: Jean-Baptiste Kempf 

Qt: menus fix. Close #2423, #2420, #2419, and #2422.

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

 modules/gui/qt4/menus.cpp |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 2998e71..97017fa 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -495,11 +495,11 @@ QMenu *QVLCMenu::AudioMenu( intf_thread_t *p_intf, QMenu * current )
     if( p_input )
         vlc_object_hold( p_input );
     p_aout = THEMIM->getAout();
-
-    AudioAutoMenuBuilder( p_aout, p_input, objects, varnames );
-
     if( p_aout )
+    {
+        AudioAutoMenuBuilder( p_aout, p_input, objects, varnames );
         vlc_object_release( p_aout );
+    }
     if( p_input )
         vlc_object_release( p_input );
 
@@ -547,12 +547,13 @@ QMenu *QVLCMenu::VideoMenu( intf_thread_t *p_intf, QMenu *current )
     p_input = THEMIM->getInput();
     if( p_input )
         vlc_object_hold( p_input );
-    p_vout = THEMIM->getVout();
-
-    VideoAutoMenuBuilder( p_vout, p_input, objects, varnames );
 
+    p_vout = THEMIM->getVout();
     if( p_vout )
+    {
+        VideoAutoMenuBuilder( p_vout, p_input, objects, varnames );
         vlc_object_release( p_vout );
+    }
     if( p_input )
         vlc_object_release( p_input );
 
@@ -585,6 +586,8 @@ QMenu *QVLCMenu::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
     vector<const char *> varnames;
 
     p_object = THEMIM->getInput();
+    if( p_object )
+        vlc_object_hold( p_object );
     InputAutoMenuBuilder( p_object, objects, varnames );
     PUSH_VAR( "prev-title" );
     PUSH_VAR( "next-title" );




More information about the vlc-devel mailing list