[NUI] add null check condition for weakReference of Registry 68/162768/1
authordongsug.song <dongsug.song@samsung.com>
Mon, 4 Dec 2017 08:07:27 +0000 (17:07 +0900)
committerhuiyu,eun <huiyu.eun@samsung.com>
Tue, 5 Dec 2017 07:46:15 +0000 (16:46 +0900)
Change-Id: Iadd764d0d1c7750415317f1360eec274c271940b
Signed-off-by: dongsug.song <dongsug.song@samsung.com>
src/Tizen.NUI/src/internal/Registry.cs

index 6d2a22b..aea7cbe 100755 (executable)
@@ -115,7 +115,8 @@ namespace Tizen.NUI
 
             if (Instance._controlMap.TryGetValue(refObjectPtr, out weakReference))
             {
-                BaseHandle ret = weakReference?.Target as BaseHandle;
+                if(weakReference == null) { throw new System.InvalidOperationException("Error! NUI Registry weakReference should not be NULL!"); }
+                BaseHandle ret = weakReference.Target as BaseHandle;
                 return ret;
             }
             else