Fix defect detected by static analysis tool 73/249473/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Sat, 12 Dec 2020 11:45:39 +0000 (20:45 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Sat, 12 Dec 2020 11:45:39 +0000 (20:45 +0900)
Change-Id: I27b5ec5443de628d116b94c4fb0001a673df2d1c
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
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: