From: Jay Cho Date: Mon, 3 May 2021 07:35:50 +0000 (+0900) Subject: [ElmSharp] Fix EcoreEvent (#2988) X-Git-Tag: submit/tizen/20210503.165250~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1aed74ad62b1473e2c1c1a37323814225b3f5a75;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [ElmSharp] Fix EcoreEvent (#2988) --- diff --git a/src/ElmSharp/ElmSharp/EcoreEvent.cs b/src/ElmSharp/ElmSharp/EcoreEvent.cs index 8b5ac84f7..7dfb3d3a0 100644 --- a/src/ElmSharp/ElmSharp/EcoreEvent.cs +++ b/src/ElmSharp/ElmSharp/EcoreEvent.cs @@ -188,10 +188,11 @@ namespace ElmSharp remove { EventHandler handler = value; - var callbacks = _nativeCallbacks.Where(cb => cb.eventHandler == handler); + var callbacks = _nativeCallbacks.Where(cb => cb.eventHandler == handler).ToList(); foreach (var cb in callbacks) { Interop.Ecore.ecore_event_handler_del(cb.nativeHandler); + _nativeCallbacks.Remove(cb); } } }