ecore-evas - x dnd/cnp - handle null data content and not segv

This commit is contained in:
Carsten Haitzler 2020-04-12 13:21:56 +01:00
parent 90cc0c465c
commit dcfb8bb580
1 changed files with 5 additions and 0 deletions

View File

@ -3862,6 +3862,11 @@ _deliver_content(Ecore_Evas *ee, Ecore_Evas_Engine_Data_X11 *edata, Ecore_Evas_S
Eina_Content *result = NULL;
Eina_Stringshare *mime_type = _decrypt_type(edata->selection_data[selection].requested_type);
if (!x11_data->data)
{
ERR("delivering NULL content");
return;
}
if (eina_str_has_prefix(mime_type,"text"))
{
//ensure that we always have a \0 at the end, there is no assertion that \0 is included here.