Commit 120502a4 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

control/media_list_view.c: Ignore exception that may happen while...

control/media_list_view.c: Ignore exception that may happen while unregistering an event, a we may never have register the event.
parent d99431bd
...@@ -74,9 +74,13 @@ uninstall_md_listener( libvlc_media_list_view_t * p_mlv, ...@@ -74,9 +74,13 @@ uninstall_md_listener( libvlc_media_list_view_t * p_mlv,
libvlc_media_descriptor_t * p_md) libvlc_media_descriptor_t * p_md)
{ {
libvlc_media_list_t * p_mlist; libvlc_media_list_t * p_mlist;
libvlc_exception_t ignored_exception;
libvlc_exception_init( &ignored_exception );
libvlc_event_detach( p_md->p_event_manager, libvlc_event_detach( p_md->p_event_manager,
libvlc_MediaDescriptorSubItemAdded, libvlc_MediaDescriptorSubItemAdded,
media_list_subitem_added, p_mlv, NULL ); media_list_subitem_added, p_mlv, &ignored_exception );
if( libvlc_exception_raised( &ignored_exception ) )
libvlc_exception_clear( &ignored_exception ); /* We don't care if we encounter an exception */
if((p_mlist = libvlc_media_descriptor_subitems( p_md, NULL ))) if((p_mlist = libvlc_media_descriptor_subitems( p_md, NULL )))
{ {
libvlc_media_list_lock( p_mlist ); libvlc_media_list_lock( p_mlist );
......
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