<html><head></head><body>I completely disagree. When event registration/deregistration fails, you're almost guaranteed a deadlock or some use after free. Much better to abort asap.<br><br><div class="gmail_quote">Le 20 septembre 2019 12:21:37 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Because you should not abort in production. Developers will still be notified<br>that they are miss-using the API with the assert.<br><br>PS: this abort was happening on iOS via VLCKit, the API miss-use had been fixed<br>here: <a href="https://code.videolan.org/videolan/VLCKit/merge_requests/19">https://code.videolan.org/videolan/VLCKit/merge_requests/19</a><hr> lib/event.c | 2 +-<br> 1 file changed, 1 insertion(+), 1 deletion(-)<br><br>diff --git a/lib/event.c b/lib/event.c<br>index 28d3d0c232..4a57029b89 100644<br>--- a/lib/event.c<br>+++ b/lib/event.c<br>@@ -179,5 +179,5 @@ void libvlc_event_detach(libvlc_event_manager_t *em, libvlc_event_type_t type,<br>              return;<br>          }<br>     }<br>-    abort();<br>+    assert(!"event not found or already detached");<br> }</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>