From: RĂ©mi Denis-Courmont Date: Mon, 16 Mar 2009 19:12:08 +0000 (+0200) Subject: Qt4: hold objet while the popup menu is active X-Git-Tag: 1.0.0-pre1~54 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=823b07a0aa5fabf0a237fea20bcca1c3334111a6;p=vlc Qt4: hold objet while the popup menu is active --- diff --git a/modules/gui/qt4/menus.hpp b/modules/gui/qt4/menus.hpp index 253c84ee52..46eaab6b4d 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;