[vlc-commits] macosx/library: add missing sanity check
Felix Paul Kühne
git at videolan.org
Mon Sep 2 11:57:43 CEST 2019
vlc | branch: master | Felix Paul Kühne <felix at feepk.net> | Fri Aug 30 16:21:22 2019 +0200| [c28403e95bf10bce5fd4a7517937d5517535e435] | committer: Felix Paul Kühne
macosx/library: add missing sanity check
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c28403e95bf10bce5fd4a7517937d5517535e435
---
modules/gui/macosx/library/VLCLibraryController.m | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/gui/macosx/library/VLCLibraryController.m b/modules/gui/macosx/library/VLCLibraryController.m
index 3477166a47..556e1c4de6 100644
--- a/modules/gui/macosx/library/VLCLibraryController.m
+++ b/modules/gui/macosx/library/VLCLibraryController.m
@@ -118,6 +118,10 @@ float kVLCDefaultThumbnailPosition = .15;
return VLC_ENOOBJ;
}
input_item_t *p_inputItem = vlc_ml_get_input_item(_p_libraryInstance, mediaItem.libraryID);
+ if (!p_inputItem) {
+ msg_Err(getIntf(), "No input item found for media id %lli", mediaItem.libraryID);
+ return VLC_ENOITEM;
+ }
int ret = [[[VLCMain sharedInstance] playlistController] addInputItem:p_inputItem atPosition:-1 startPlayback:playImmediately];
input_item_Release(p_inputItem);
if (ret == VLC_SUCCESS) {
More information about the vlc-commits
mailing list