Fixed defects detected by static analysis tool 19/222819/1
authorInHong Han <inhong1.han@samsung.com>
Mon, 20 Jan 2020 09:00:56 +0000 (18:00 +0900)
committerInHong Han <inhong1.han@samsung.com>
Mon, 20 Jan 2020 09:00:56 +0000 (18:00 +0900)
Change-Id: I69726a6b58960a1204d5057362757e162aa27881

src/sclconnection-isf.cpp

index e8063a5..5e00c97 100644 (file)
@@ -190,16 +190,17 @@ static void slot_ise_show(const scim::HelperAgent *agent, int ic, char *buf, siz
                 ui->process_keyboard_ui_state_change(KEYBOARD_UI_STATE_WILL_SHOW);
             }
             callback->on_ise_show(ic, impl->get_screen_rotation_degree(), ise_context);
-            SclSize portrait;
-            SclSize landscape;
-            ui->get_keyboard_size(&portrait, &landscape);
-            /* If the ime_set_size() API is not called and IME is shown, the app can not receive the keyboard window's geometry from ISF.
-               And the ime_set_size() API is not called unless the IME size changes.
-            */
-            ui->update_keyboard_geometry(portrait, landscape);
             if (ui) {
+                SclSize portrait;
+                SclSize landscape;
+                ui->get_keyboard_size(&portrait, &landscape);
+                /* If the ime_set_size() API is not called and IME is shown, the app can not receive the keyboard window's geometry from ISF.
+                And the ime_set_size() API is not called unless the IME size changes.
+                */
+                ui->update_keyboard_geometry(portrait, landscape);
                 ui->process_keyboard_ui_state_change(KEYBOARD_UI_STATE_DID_SHOW);
-            }
+            } else
+                LOGW("Failed to get core UI");
 
 #ifdef WEBSOCKET
             g_websocket.on_set_layout(ise_context.layout);