<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head></head><body><div style="font-size: 12pt; font-family: Calibri,sans-serif;"><div>This patch is a no op. No thanks.</div><div><br></div><div>-- </div><div>Rémi Denis-Courmont</div><div>Sent from my NVIDIA Tegra-powered device</div><br><div id="htc_header">----- Reply message -----<br>De : "Steve Lhomme" <robux4@gmail.com><br>Pour : <vlc-devel@videolan.org><br>Objet : [vlc-devel] [PATCH] [RFC] don't crash when detaching an event listener that wasn't attached<br>Date : lun., juil. 27, 2015 08:13</div></div><br><pre style="word-wrap: break-word; white-space: pre-wrap;">---
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:
<a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a>
</pre></body></html>