[vlc-devel] commit: Qt4: hold objet while the popup menu is active ( Rémi Denis-Courmont )

git version control git at videolan.org
Mon Mar 16 20:12:32 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Mar 16 21:12:08 2009 +0200| [823b07a0aa5fabf0a237fea20bcca1c3334111a6] | committer: Rémi Denis-Courmont 

Qt4: hold objet while the popup menu is active

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

 modules/gui/qt4/menus.hpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/menus.hpp b/modules/gui/qt4/menus.hpp
index 253c84e..46eaab6 100644
--- a/modules/gui/qt4/menus.hpp
+++ b/modules/gui/qt4/menus.hpp
@@ -53,6 +53,8 @@ public:
                   vlc_value_t _val, const char *_var ) : QObject( parent )
     {
         p_obj = _p_obj;
+        if( p_obj )
+            vlc_object_hold( p_obj );
         i_val_type = _i_type;
         val = _val;
         psz_var = strdup( _var );
@@ -62,6 +64,8 @@ public:
         free( psz_var );
         if( ( i_val_type & VLC_VAR_TYPE) == VLC_VAR_STRING )
             free( val.psz_string );
+        if( p_obj )
+            vlc_object_release( p_obj );
     }
 
     vlc_object_t *p_obj;




More information about the vlc-devel mailing list