]> git.sesse.net Git - vlc/commitdiff
growl: fix crash when trying to read null object (fixes #8659)
authorDavid Fuhrmann <david.fuhrmann@googlemail.com>
Tue, 21 May 2013 19:23:40 +0000 (21:23 +0200)
committerDavid Fuhrmann <david.fuhrmann@googlemail.com>
Tue, 21 May 2013 19:25:32 +0000 (21:25 +0200)
modules/notify/growl.m

index f23f117b3c378a130f19e4381446520b8119e123..d9dae02e2a4e3a1c50f092b835741271fea3d5ba 100644 (file)
@@ -167,11 +167,18 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
     /* Don't update each time an item has been preparsed */
     if( b_is_item_current )
     { /* stores the current input item id */
+        input_thread_t *p_input = playlist_CurrentInput( (playlist_t*)p_this );
+        if( !p_input )
+            return VLC_SUCCESS;
+
+        p_item = input_GetItem( p_input );
         if( p_intf->p_sys->i_id != p_item->i_id )
         {
             p_intf->p_sys->i_id = p_item->i_id;
             p_intf->p_sys->i_item_changes = 0;
         }
+
+        vlc_object_release( p_input );
         return VLC_SUCCESS;
     }
     /* ignore items which weren't pre-parsed yet */