[vlc-commits] growl: fix crash when trying to read null object (fixes #8659)

David Fuhrmann git at videolan.org
Tue May 21 21:25:45 CEST 2013


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Tue May 21 21:23:40 2013 +0200| [7111671faa0c73b13618adb9c610a0526563cda3] | committer: David Fuhrmann

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

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

 modules/notify/growl.m |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/notify/growl.m b/modules/notify/growl.m
index f23f117..d9dae02 100644
--- a/modules/notify/growl.m
+++ b/modules/notify/growl.m
@@ -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 */



More information about the vlc-commits mailing list