[vlc-commits] macOS notification: fix crash on first item

Jean-Baptiste Kempf git at videolan.org
Wed Nov 16 18:31:31 CET 2016


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Nov 16 18:31:14 2016 +0100| [1afd117faf50e266998ace5f08f06e52b2260958] | committer: Jean-Baptiste Kempf

macOS notification: fix crash on first item

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

 modules/notify/osx_notifications.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/notify/osx_notifications.m b/modules/notify/osx_notifications.m
index 5778da4..f0986a7 100644
--- a/modules/notify/osx_notifications.m
+++ b/modules/notify/osx_notifications.m
@@ -206,7 +206,8 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
         input_item_t *p_item = input_GetItem( p_input );
         if( p_sys->current_item != p_item )
         {
-            input_item_Release( p_sys->current_item );
+            if( p_sys->current_item != NULL )
+                input_item_Release( p_sys->current_item );
             p_sys->current_item = input_item_Hold( p_item );
             p_sys->i_item_changes = 0;
         }



More information about the vlc-commits mailing list