Commit 7111671f authored by David Fuhrmann's avatar David Fuhrmann

growl: fix crash when trying to read null object (fixes #8659)

parent a8dcf91d
...@@ -167,11 +167,18 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var, ...@@ -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 */ /* Don't update each time an item has been preparsed */
if( b_is_item_current ) if( b_is_item_current )
{ /* stores the current input item id */ { /* 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 ) 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_id = p_item->i_id;
p_intf->p_sys->i_item_changes = 0; p_intf->p_sys->i_item_changes = 0;
} }
vlc_object_release( p_input );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
/* ignore items which weren't pre-parsed yet */ /* ignore items which weren't pre-parsed yet */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment