[NUI] Prevent NullReferenceException when creating TextLabel
authorJiyun Yang <ji.yang@samsung.com>
Fri, 27 Jan 2023 05:26:59 +0000 (14:26 +0900)
committerJiyun Yang <ji.yang@samsung.com>
Mon, 13 Feb 2023 04:45:05 +0000 (13:45 +0900)
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/public/Theme/ThemeManager.cs

index 535bece..e3f37e2 100755 (executable)
@@ -265,12 +265,12 @@ namespace Tizen.NUI
         /// <summary>
         /// Load a initial component style.
         /// </summary>
-        internal static ViewStyle GetInitialStyleWithoutClone(string styleName) => themeForInitialize.GetStyle(styleName);
+        internal static ViewStyle GetInitialStyleWithoutClone(string styleName) => themeForInitialize?.GetStyle(styleName);
 
         /// <summary>
         /// Load a initial component style.
         /// </summary>
-        internal static ViewStyle GetInitialStyleWithoutClone(Type viewType) => themeForInitialize.GetStyle(viewType);
+        internal static ViewStyle GetInitialStyleWithoutClone(Type viewType) => themeForInitialize?.GetStyle(viewType);
 
         /// <summary>
         /// Get a platform installed theme.