Fix conversion warnings for event refactor
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / tizen-wayland / framework-tizen.cpp
index f944bd7..09ee3fb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
 #include <app_control_internal.h>
 #include <app_common.h>
 #include <bundle.h>
-#include <Ecore.h>
+#include <dali/internal/system/linux/dali-ecore.h>
 
 #include <system_info.h>
 #include <system_settings.h>
@@ -193,12 +193,20 @@ struct Framework::Impl
     mApplicationType = type;
     mCallbackManager = CallbackManager::New();
 
-    char* region;
-    char* language;
+    char* region = nullptr;
+    char* language = nullptr;
     system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &region );
     system_settings_get_value_string( SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &language );
-    mRegion = std::string( region );
-    mLanguage = std::string( language );
+
+    if (region != nullptr)
+    {
+      mRegion = std::string( region );
+    }
+
+    if ( language != nullptr)
+    {
+      mLanguage = std::string( language );
+    }
   }
 
   ~Impl()