forked from enlightenment/efl
Elm_Code: check pointer nullity before using it
This commit is contained in:
parent
2579733515
commit
1b85d7d12f
|
@ -842,10 +842,13 @@ _elm_code_widget_line_status_toggle(Elm_Code_Widget *widget EINA_UNUSED, Elm_Cod
|
||||||
elm_box_pack_after(pd->gridbox, status, grid);
|
elm_box_pack_after(pd->gridbox, status, grid);
|
||||||
evas_object_data_set(grid, "status", status);
|
evas_object_data_set(grid, "status", status);
|
||||||
|
|
||||||
text = malloc((strlen(template) + strlen(line->status_text) + 1) * sizeof(char));
|
if (line->status_text)
|
||||||
sprintf(text, template, line->status_text);
|
{
|
||||||
elm_object_text_set(status, text);
|
text = malloc((strlen(template) + strlen(line->status_text) + 1) * sizeof(char));
|
||||||
free(text);
|
sprintf(text, template, line->status_text);
|
||||||
|
elm_object_text_set(status, text);
|
||||||
|
free(text);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue