if (!source->mime_types)
source->mime_types = eina_array_new(1);
+
+ EINA_SAFETY_ON_NULL_RETURN(source->mime_types);
+
eina_array_push(source->mime_types, eina_stringshare_add(mime_type));
}
if (!clip_source) return;
t = eina_array_data_get(source->mime_types, 0);
- if (!strcmp(mime_type, t))
+ if ((t) && (!strcmp(mime_type, t)))
_e_comp_wl_clipboard_offer_create(clip_source, fd);
else
close(fd);
{
if (!source->data_source.mime_types)
source->data_source.mime_types = eina_array_new(1);
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(source->data_source.mime_types, NULL);
+
eina_array_push(source->data_source.mime_types, eina_stringshare_add(mime_type));
}