void
evas_common_text_props_content_ref(Evas_Text_Props *props)
{
- /* No info in this case */
- if (props->len == 0)
+ /* No content in this case */
+ if (!props->info)
return;
props->info->refcount++;
void
evas_common_text_props_content_unref(Evas_Text_Props *props)
{
- /* No info in this case */
- if (props->len == 0)
+ /* No content in this case */
+ if (!props->info)
return;
if (--(props->info->refcount) == 0)
{
evas_common_text_props_content_unref(text_props);
}
+ if (len == 0)
+ {
+ text_props->info = NULL;
+ text_props->start = text_props->len = text_props->text_offset = 0;
+ }
text_props->info = calloc(1, sizeof(Evas_Text_Props_Info));
fi = fn->fonts->data;