[vlc-devel] [PATCH] [RFC] don't crash when detaching an event listener that wasn't attached

Steve Lhomme robux4 at videolabs.io
Mon Jul 27 09:44:30 CEST 2015


Yep, sorry. The crash I had was from the line above but pointing to this one...

On Mon, Jul 27, 2015 at 9:24 AM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> This patch is a no op. No thanks.
>
> --
> Rémi Denis-Courmont
> Sent from my NVIDIA Tegra-powered device
>
> ----- Reply message -----
> De : "Steve Lhomme" <robux4 at gmail.com>
> Pour : <vlc-devel at videolan.org>
> Objet : [vlc-devel] [PATCH] [RFC] don't crash when detaching an event
> listener that wasn't attached
> Date : lun., juil. 27, 2015 08:13
>
> ---
> At least on Release builds I don't see why this should crash. It should
> return
> an error so the caller knows it did something wrong and what. That will
> change
> libvlc ABI if we return an `int` where there's currently a `void`.
> ---
>  lib/event.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/lib/event.c b/lib/event.c
> index 4a95cee..c2b763d 100644
> --- a/lib/event.c
> +++ b/lib/event.c
> @@ -459,5 +459,7 @@ void libvlc_event_detach( libvlc_event_manager_t
> *p_event_manager,
>
>      libvlc_event_async_ensure_listener_removal(p_event_
> manager, &listener_to_remove);
>
> +#ifndef NDEBUG
>      assert(found);
> +#endif
>  }
> --
> 2.4.5
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
>
> _______________________________________________
> 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