[vlc-commits] macosx: Fix title changed callback

David Fuhrmann git at videolan.org
Mon Apr 15 23:19:04 CEST 2019


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Mon Apr 15 23:17:11 2019 +0200| [5c4bb8b17c0ddf7d9894cdf70a2fa3f68ca8680b] | committer: David Fuhrmann

macosx: Fix title changed callback

p_titles can be NULL, which cannot be retained.

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

 modules/gui/macosx/playlist/VLCPlayerController.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/gui/macosx/playlist/VLCPlayerController.m b/modules/gui/macosx/playlist/VLCPlayerController.m
index 9ad93370b1..cdbdb9c4ca 100644
--- a/modules/gui/macosx/playlist/VLCPlayerController.m
+++ b/modules/gui/macosx/playlist/VLCPlayerController.m
@@ -207,7 +207,9 @@ static void cb_player_titles_changed(vlc_player_t *p_player,
                                      void *p_data)
 {
     VLC_UNUSED(p_player);
-    vlc_player_title_list_Hold(p_titles);
+    if (p_titles)
+        vlc_player_title_list_Hold(p_titles);
+
     dispatch_async(dispatch_get_main_queue(), ^{
         VLCPlayerController *playerController = (__bridge VLCPlayerController *)p_data;
         [playerController titleListChanged:p_titles];



More information about the vlc-commits mailing list