[NUI] Fix Svace issue (#491)
authorhuiyueun <35286162+huiyueun@users.noreply.github.com>
Mon, 1 Oct 2018 06:29:47 +0000 (15:29 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Mon, 1 Oct 2018 06:29:47 +0000 (15:29 +0900)
DEREF_OF_NULL issue

Signed-off-by: huiyu.eun <huiyu.eun@samsung.com>
src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticResourceExtension.cs

index d2ad139..c5577cd 100755 (executable)
@@ -46,7 +46,9 @@ namespace Tizen.NUI.Xaml
                     if (resource.GetType().GetTypeInfo().IsGenericType && (resource.GetType().GetGenericTypeDefinition() == typeof(OnPlatform<>) || resource.GetType().GetGenericTypeDefinition() == typeof(OnIdiom<>))) {
                         // This is only there to support our backward compat story with pre 2.3.3 compiled Xaml project who was not providing TargetProperty
                         var method = resource.GetType().GetRuntimeMethod("op_Implicit", new[] { resource.GetType() });
-                        resource = method.Invoke(null, new[] { resource });
+                        if (method != null) {
+                            resource = method.Invoke(null, new[] { resource });
+                        }
                     }
                 }
                 return resource;