[NUI] Fix svace issue
authorzhouleonlei <zhouleon.lei@samsung.com>
Tue, 14 Sep 2021 01:48:08 +0000 (09:48 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Tue, 14 Sep 2021 03:19:19 +0000 (12:19 +0900)
src/Tizen.NUI/src/internal/XamlBinding/MergedStyle.cs

index 6c8c657..ebf6439 100755 (executable)
@@ -127,18 +127,18 @@ namespace Tizen.NUI.Binding
         void RegisterImplicitStyles()
         {
             Type type = TargetType;
-            if (type == null)
-            {
-                return;
-            }
             while (true)
             {
-                BindableProperty implicitStyleProperty = BindableProperty.Create(nameof(ImplicitStyle), typeof(XamlStyle), typeof(View), default(XamlStyle),
-                        propertyChanged: (bindable, oldvalue, newvalue) => OnImplicitStyleChanged());
-                implicitStyles.Add(implicitStyleProperty);
-                Target.SetDynamicResource(implicitStyleProperty, type.FullName);
-                type = type.GetTypeInfo().BaseType;
-                if (type != null && stopAtTypes.Contains(type))
+                if (type != null)
+                {
+                    BindableProperty implicitStyleProperty = BindableProperty.Create(nameof(ImplicitStyle), typeof(XamlStyle), typeof(View), default(XamlStyle),
+                            propertyChanged: (bindable, oldvalue, newvalue) => OnImplicitStyleChanged());
+                    implicitStyles.Add(implicitStyleProperty);
+                    Target.SetDynamicResource(implicitStyleProperty, type.FullName);
+                    type = type.GetTypeInfo().BaseType;
+                }
+
+                if (type == null || stopAtTypes.Contains(type))
                     return;
             }
         }