Fix defect detected by static analysis tool
[platform/core/uifw/ise-default.git] / src / ise.cpp
index aa817e7..f2bd7da 100644 (file)
@@ -2619,13 +2619,15 @@ static void set_ime_size(bool floating_mode, ISE_CANDIDATE_REQUEST candidate_req
                 }
                 break;
             case ISE_CANDIDATE_REQ_SHOW:
-                ui->set_custom_starting_coordinates(0, candidate->get_height());
-                if (g_input_panel_show || g_candidate_more_view) {
-                    size_portrait.height += candidate->get_height();
-                    size_landscape.height += candidate->get_height();
-                } else {
-                    size_portrait.height = candidate->get_height();
-                    size_landscape.height = candidate->get_height();
+                if (candidate) {
+                    ui->set_custom_starting_coordinates(0, candidate->get_height());
+                    if (g_input_panel_show || g_candidate_more_view) {
+                        size_portrait.height += candidate->get_height();
+                        size_landscape.height += candidate->get_height();
+                    } else {
+                        size_portrait.height = candidate->get_height();
+                        size_landscape.height = candidate->get_height();
+                    }
                 }
                 break;
             case ISE_CANDIDATE_REQ_HIDE: