forked from enlightenment/efl
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:
parent
f6cac7ed9a
commit
694c16ab2b
|
@ -1841,6 +1841,9 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, Elm_Code_Line *newline)
|
||||||
if (!pd->code)
|
if (!pd->code)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!pd->code->file->lines)
|
||||||
|
return;
|
||||||
|
|
||||||
evas_object_geometry_get(widget, NULL, NULL, &ww, &wh);
|
evas_object_geometry_get(widget, NULL, NULL, &ww, &wh);
|
||||||
|
|
||||||
old_width = ww;
|
old_width = ww;
|
||||||
|
|
Loading…
Reference in New Issue