Change-Id: Id809e66da6124716c6c0bbf862acbeceb7799369
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
#include "common/utils/profile_util.h"
+#include <manifest_parser/utils/logging.h>
+
#include <system_info.h>
#include <cstdlib>
if (__builtin_expect(profile != TizenProfile::UNKNOWN, 1))
return profile;
- system_info_get_platform_string("http://tizen.org/feature/profile",
+ int ret = system_info_get_platform_string("http://tizen.org/feature/profile",
&profileName);
+ if (ret != SYSTEM_INFO_ERROR_NONE) {
+ LOG(ERROR) << "Can't get the profile info";
+ return profile;
+ }
+
+ if (!profileName) {
+ LOG(ERROR) << "Profile value is NULL";
+ return profile;
+ }
+
switch (*profileName) {
case 'm':
case 'M':