[NUI] Fix failed in TCT
authorFang Xiaohui <xiaohui.fang@samsung.com>
Thu, 2 Dec 2021 03:04:19 +0000 (11:04 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 8 Dec 2021 08:43:35 +0000 (17:43 +0900)
src/Tizen.NUI.Components/Controls/Slider.cs
src/Tizen.NUI.Components/Controls/SliderBindableProperty.cs
src/Tizen.NUI.Components/Controls/Switch.cs

index 905a78b..5462213 100755 (executable)
@@ -602,7 +602,7 @@ namespace Tizen.NUI.Components
         }
         private StringSelector InternalThumbImageURLSelector
         {
-            get => thumbImage == null ? null : new StringSelector(thumbImage.ResourceUrlSelector);
+            get => thumbImage?.ResourceUrlSelector == null ? null : new StringSelector(thumbImage.ResourceUrlSelector);
             set
             {
                 if (value == null || thumbImage == null)
index e0459cb..d11c2a5 100755 (executable)
@@ -103,10 +103,7 @@ namespace Tizen.NUI.Components
         public static readonly BindableProperty ThumbImageURLSelectorProperty = BindableProperty.Create(nameof(ThumbImageURLSelector), typeof(StringSelector), typeof(Slider), null, propertyChanged: (bindable, oldValue, newValue) =>
         {
             var instance = (Slider)bindable;
-            if (newValue != null)
-            {
-                instance.InternalThumbImageURLSelector = newValue as StringSelector;
-            }
+            instance.InternalThumbImageURLSelector = newValue as StringSelector;
         },
         defaultValueCreator: (bindable) =>
         {
index 7430b1d..b6e3b0d 100755 (executable)
@@ -184,7 +184,7 @@ namespace Tizen.NUI.Components
         }
         private StringSelector InternalSwitchBackgroundImageURLSelector
         {
-            get => new StringSelector(Icon.ResourceUrlSelector);
+            get => Icon?.ResourceUrlSelector == null ? null : new StringSelector(Icon.ResourceUrlSelector);
             set
             {
                 Debug.Assert(Icon != null);