From e44609ee2c038c9f551b743b2863528eead0c21c Mon Sep 17 00:00:00 2001 From: Seungkeun Lee Date: Mon, 4 Sep 2017 13:49:59 +0900 Subject: [PATCH] [ElmSharp] Fix RenderPost event remove Handler - evas event callback was not deleted when there is no more handler - EventHandler was null when there is no handler - So, should use GetInvocationList().Length to check exist of handler Change-Id: I17bed9a3fea81bae6120c24cae476f33528a9053 --- src/ElmSharp/ElmSharp/EvasObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ElmSharp/ElmSharp/EvasObject.cs b/src/ElmSharp/ElmSharp/EvasObject.cs index 9c5b71b..83ace1b 100644 --- a/src/ElmSharp/ElmSharp/EvasObject.cs +++ b/src/ElmSharp/ElmSharp/EvasObject.cs @@ -216,7 +216,7 @@ namespace ElmSharp remove { _renderPost -= value; - if (_renderPost?.GetInvocationList().Length == 0) + if (_renderPost == null) { Interop.Evas.evas_event_callback_del(Interop.Evas.evas_object_evas_get(RealHandle), Interop.Evas.ObjectCallbackType.RenderPost, _renderPostCallback); _renderPostCallback = null; -- 2.7.4