Fix crash issue when getting profile 64/240764/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Tue, 11 Aug 2020 07:56:01 +0000 (16:56 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Tue, 11 Aug 2020 07:56:01 +0000 (16:56 +0900)
Change-Id: I2ef4f15c2c8db6e6c8ee093a7fcd03268943accb
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
ism/src/tizen_profile.cpp

index 2ee3d30..84314b0 100644 (file)
@@ -35,8 +35,13 @@ tizen_profile_t _get_tizen_profile()
     if (__builtin_expect(profile != TIZEN_PROFILE_UNKNOWN, 1))
         return profile;
 
-    char *profileName;
-    system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+    char *profileName = NULL;
+    if (system_info_get_platform_string("http://tizen.org/feature/profile", &profileName) != SYSTEM_INFO_ERROR_NONE)
+        return TIZEN_PROFILE_COMMON;
+
+    if (!profileName)
+        return TIZEN_PROFILE_COMMON;
+
     switch (*profileName)
     {
         case 'm':