]> git.sesse.net Git - vlc/commitdiff
Interaction: set the p_parent field
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 1 Feb 2009 10:56:23 +0000 (12:56 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 1 Feb 2009 10:56:23 +0000 (12:56 +0200)
I wonder why it was there in the first place.

src/interface/interaction.c

index dbc7d337895ce1c6f18275099bd3e8c3cbe814dd..c3322c11d4655689a4cb1350699ca639e18617e6 100644 (file)
@@ -75,6 +75,7 @@ static int DialogSend( vlc_object_t *, interaction_dialog_t * );
 #define DIALOG_INIT( type, err ) \
         interaction_dialog_t* p_new = calloc( 1, sizeof( interaction_dialog_t ) ); \
         if( !p_new ) return err;                        \
+        p_new->p_parent = vlc_object_hold( p_this );    \
         p_new->b_cancelled = false;                     \
         p_new->i_status = NEW_DIALOG;                   \
         p_new->i_flags = 0;                             \
@@ -467,6 +468,7 @@ static void DialogDestroy( interaction_dialog_t *p_dialog )
     free( p_dialog->psz_default_button );
     free( p_dialog->psz_alternate_button );
     free( p_dialog->psz_other_button );
+    vlc_object_release( p_dialog->p_parent );
     free( p_dialog );
 }