From 01e8adfaa108fc15299e39d6553e9b52103c37dc Mon Sep 17 00:00:00 2001 From: huiyueun <35286162+huiyueun@users.noreply.github.com> Date: Tue, 21 Jan 2020 16:33:16 +0900 Subject: [PATCH] [NUI] Add dispose checking in key state (#1337) Signed-off-by: huiyu.eun --- src/Tizen.NUI/src/public/Key.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Tizen.NUI/src/public/Key.cs b/src/Tizen.NUI/src/public/Key.cs index 483a8f6..7751d09 100755 --- a/src/Tizen.NUI/src/public/Key.cs +++ b/src/Tizen.NUI/src/public/Key.cs @@ -353,6 +353,11 @@ namespace Tizen.NUI } get { + if (disposed) + { + NUILog.Error("[ERR] already disposed! cannot call native method! just return!"); + return (Key.StateType)(-1); + } Key.StateType ret = (Key.StateType)Interop.Key.Key_state_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; -- 2.7.4