Fix crash when appending a line off and the body

is already larger than the viewport
This commit is contained in:
Andy Williams 2014-11-18 20:56:47 +00:00
parent d6da31acf3
commit 5a7f736d95
1 changed files with 6 additions and 0 deletions

View File

@ -111,12 +111,18 @@ _elm_code_widget_line_cb(void *data EINA_UNUSED, Eo *obj,
{
Elm_Code_Line *line;
Evas_Object *o;
int h;
Evas_Textgrid_Cell *cells;
line = (Elm_Code_Line *)event_info;
o = (Evas_Object *)obj;
evas_object_textgrid_size_get(o, NULL, &h);
if (line->number > (unsigned int) h)
return EINA_TRUE;
cells = evas_object_textgrid_cellrow_get(o, line->number - 1);
_elm_code_widget_fill_line(o, cells, line);