[NUI] Add dispose checking in key state (#1337)
authorhuiyueun <35286162+huiyueun@users.noreply.github.com>
Tue, 21 Jan 2020 07:33:16 +0000 (16:33 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 21 Jan 2020 07:33:16 +0000 (16:33 +0900)
Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/Tizen.NUI/src/public/Key.cs

index 483a8f6..7751d09 100755 (executable)
@@ -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;