[NUI] Fix failed in TCT
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI.Components / Controls / Switch.cs
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);