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
This commit is contained in:
YeongJong Lee 2017-01-28 12:38:37 +00:00 committed by Andy Williams
parent f6cac7ed9a
commit 694c16ab2b
1 changed files with 3 additions and 0 deletions

View File

@ -1841,6 +1841,9 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, Elm_Code_Line *newline)
if (!pd->code)
return;
if (!pd->code->file->lines)
return;
evas_object_geometry_get(widget, NULL, NULL, &ww, &wh);
old_width = ww;