[vlc-devel] [PATCH] lib: assert instead of abort

Steve Lhomme robux4 at ycbcr.xyz
Fri Sep 20 12:55:13 CEST 2019


+1
*1000

On 2019-09-20 11:21, Thomas Guillem wrote:
> Because you should not abort in production. Developers will still be notified
> that they are miss-using the API with the assert.
> 
> PS: this abort was happening on iOS via VLCKit, the API miss-use had been fixed
> here: https://code.videolan.org/videolan/VLCKit/merge_requests/19
> ---
>   lib/event.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/event.c b/lib/event.c
> index 28d3d0c232..4a57029b89 100644
> --- a/lib/event.c
> +++ b/lib/event.c
> @@ -179,5 +179,5 @@ void libvlc_event_detach(libvlc_event_manager_t *em, libvlc_event_type_t type,
>                return;
>            }
>       }
> -    abort();
> +    assert(!"event not found or already detached");
>   }
> -- 
> 2.20.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list