summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongJong Lee <cleanlyj@naver.com>2017-01-28 12:38:37 +0000
committerAndy Williams <andy@andywilliams.me>2017-01-28 12:54:54 +0000
commit694c16ab2bfbb67f535e3475d358fdb41ddf8be1 (patch)
tree9fc38e4892684ec2ed32aaeb5a6b816f12950395
parentf6cac7ed9a042bb7fad7fb0b9c75abccf38cd878 (diff)
elm_code: Add a safety code to prevent arithmetic exception
Test Plan: 1. elementary_test - Code Editor 2. Chack there is not arithmetic exception Reviewers: ajwillia.ms Reviewed By: ajwillia.ms Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4621
-rw-r--r--src/lib/elementary/elm_code_widget.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_code_widget.c b/src/lib/elementary/elm_code_widget.c
index fe91214b33..98799d5f49 100644
--- a/src/lib/elementary/elm_code_widget.c
+++ b/src/lib/elementary/elm_code_widget.c
@@ -1841,6 +1841,9 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, Elm_Code_Line *newline)
1841 if (!pd->code) 1841 if (!pd->code)
1842 return; 1842 return;
1843 1843
1844 if (!pd->code->file->lines)
1845 return;
1846
1844 evas_object_geometry_get(widget, NULL, NULL, &ww, &wh); 1847 evas_object_geometry_get(widget, NULL, NULL, &ww, &wh);
1845 1848
1846 old_width = ww; 1849 old_width = ww;