[NUI] Fix some errors when we remove NUI_PROPERTY_CHANGE tag
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 26 Oct 2022 05:44:15 +0000 (14:44 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 10 Nov 2022 01:25:11 +0000 (10:25 +0900)
1. Add nullcheck when NUI_VISUAL_PROPERTY_CHANGE_1 not defined.
2. Fix compile error when NUI_ANIMATION_PROPERTY_CHANGE_1 not defined.

Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/internal/Common/PropertyHelper.cs
src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs

index 309600b..0390856 100755 (executable)
@@ -260,6 +260,7 @@ namespace Tizen.NUI
                 return PropertyValue.CreateFromObject(refined);
             }
 
+#if NUI_ANIMATION_PROPERTY_CHANGE_1
             // Refine object as IntPtr of PropertyValue to optimize.
             // Warning : This API don't automatically release memory.
             internal global::System.IntPtr RefineValueIntPtr(object value)
@@ -280,6 +281,7 @@ namespace Tizen.NUI
 
                 return PropertyValue.CreateFromObjectIntPtr(refined);
             }
+#endif
 
             internal KeyFrames RefineKeyFrames(KeyFrames keyFrames)
             {
index 6eb7273..d24362b 100755 (executable)
@@ -1318,7 +1318,8 @@ namespace Tizen.NUI.BaseComponents
             Interop.View.InternalRetrievingVisualPropertyInt(this.SwigCPtr, Property.BACKGROUND, Visual.Property.Type, out visualType);
             return visualType == (int)Visual.Type.Invalid;
 #else
-            return Background.Empty();
+            PropertyMap background = Background;
+            return (background == null || background.Empty());
 #endif
         }