evas - textgrid - guard against null/empty glyphs
not sure how someone got to this point - but this should not be null, so don't crash if it is. @fix
This commit is contained in:
parent
e9e40eb610
commit
5f85967da1
|
@ -379,6 +379,7 @@ _drop_glyphs_ref(const void *container EINA_UNUSED, void *data, void *fdata)
|
||||||
Evas_Font_Array_Data *fad = data;
|
Evas_Font_Array_Data *fad = data;
|
||||||
Evas_Public_Data *pd = fdata;
|
Evas_Public_Data *pd = fdata;
|
||||||
|
|
||||||
|
if (fad->glyphs)
|
||||||
evas_common_font_glyphs_unref(fad->glyphs);
|
evas_common_font_glyphs_unref(fad->glyphs);
|
||||||
eina_array_pop(&pd->glyph_unref_queue);
|
eina_array_pop(&pd->glyph_unref_queue);
|
||||||
|
|
||||||
|
@ -553,10 +554,12 @@ evas_object_textgrid_render(Evas_Object *eo_obj EINA_UNUSED,
|
||||||
|
|
||||||
props = &text->text_props;
|
props = &text->text_props;
|
||||||
evas_common_font_draw_prepare(props);
|
evas_common_font_draw_prepare(props);
|
||||||
|
if (props->glyphs)
|
||||||
|
{
|
||||||
evas_common_font_glyphs_ref(props->glyphs);
|
evas_common_font_glyphs_ref(props->glyphs);
|
||||||
evas_unref_queue_glyph_put(obj->layer->evas,
|
evas_unref_queue_glyph_put(obj->layer->evas,
|
||||||
props->glyphs);
|
props->glyphs);
|
||||||
|
}
|
||||||
|
|
||||||
fad = eina_inarray_grow(texts->array, 1);
|
fad = eina_inarray_grow(texts->array, 1);
|
||||||
if (!fad)
|
if (!fad)
|
||||||
|
|
Loading…
Reference in New Issue