[NUI] add null check condition for weakReference of Registry 58/162558/1 5.0.0-preview1-00398
authordongsug.song <dongsug.song@samsung.com>
Mon, 4 Dec 2017 08:07:27 +0000 (17:07 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Mon, 4 Dec 2017 08:07:27 +0000 (17:07 +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