Fix issue detected by static analysis tool 07/252507/2
authorJihoon Kim <jihoon48.kim@samsung.com>
Fri, 29 Jan 2021 04:54:12 +0000 (13:54 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Fri, 29 Jan 2021 04:56:20 +0000 (13:56 +0900)
Change-Id: I6e1a2ae9e1e2ec250457743a2ad149e02ceabcbc
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/autofill.cpp
src/ise-language-change.cpp

index e2bba60..e360536 100644 (file)
@@ -155,8 +155,8 @@ Eina_Bool ime_autofill_clear()
 {
     int ret = CKMC_ERROR_NONE;
 
-    ckmc_alias_list_s *alias_list;
-    ckmc_alias_list_s *plist;
+    ckmc_alias_list_s *alias_list = NULL;
+    ckmc_alias_list_s *plist = NULL;
 
     ret = ckmc_get_data_alias_list(&alias_list);
     if (CKMC_ERROR_NONE != ret) {
index bd60e6c..a8e0c12 100644 (file)
@@ -90,12 +90,14 @@ static void __ise_init_space_flick_lang_change_popup_variables(short int space_b
 void ise_show_space_flick_language_change_popup(short int space_button_x, short int space_button_y, short int space_button_width, short int space_button_height)
 {
 #ifdef _WEARABLE
-    int space_button_width_tmp, space_button_height_tmp;
+    int space_button_width_tmp = 0, space_button_height_tmp = 0;
     CSCLUI *ui = get_ui();
-    space_button_width_tmp = ui->get_scaled_x(SPACE_SIZE_WIDTH);
-    space_button_height_tmp = ui->get_scaled_y(SPACE_SIZE_HEIGHT);
-    space_button_x = ui->get_scaled_x(space_button_x + space_button_width) - space_button_width_tmp + ui->get_scaled_x(SPACE_PADDING_X);
-    space_button_y = ui->get_scaled_y(space_button_y + space_button_height) - space_button_height_tmp + ui->get_scaled_y(SPACE_PADDING_Y + SPACE_KEY_HEIGHT);
+    if (ui) {
+        space_button_width_tmp = ui->get_scaled_x(SPACE_SIZE_WIDTH);
+        space_button_height_tmp = ui->get_scaled_y(SPACE_SIZE_HEIGHT);
+        space_button_x = ui->get_scaled_x(space_button_x + space_button_width) - space_button_width_tmp + ui->get_scaled_x(SPACE_PADDING_X);
+        space_button_y = ui->get_scaled_y(space_button_y + space_button_height) - space_button_height_tmp + ui->get_scaled_y(SPACE_PADDING_Y + SPACE_KEY_HEIGHT);
+    }
     space_button_width = space_button_width_tmp;
     space_button_height = space_button_height_tmp;
 #endif