summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/ecore_evas/engines/x/ecore_evas_x.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index 5730037e11..a107f66a6d 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -3862,12 +3862,7 @@ _deliver_content(Ecore_Evas *ee, Ecore_Evas_Engine_Data_X11 *edata, Ecore_Evas_S
3862 Eina_Content *result = NULL; 3862 Eina_Content *result = NULL;
3863 Eina_Stringshare *mime_type = _decrypt_type(edata->selection_data[selection].requested_type); 3863 Eina_Stringshare *mime_type = _decrypt_type(edata->selection_data[selection].requested_type);
3864 3864
3865 if (!ev->data) 3865 EINA_SAFETY_ON_NULL_GOTO(ev->data, err);
3866 {
3867 ERR("delivering NULL content");
3868 return;
3869 }
3870
3871 if (eina_streq(mime_type, "text/uri-list")) 3866 if (eina_streq(mime_type, "text/uri-list"))
3872 { 3867 {
3873 Ecore_X_Selection_Data_Files *files = ev->data; 3868 Ecore_X_Selection_Data_Files *files = ev->data;
@@ -3918,7 +3913,7 @@ _deliver_content(Ecore_Evas *ee, Ecore_Evas_Engine_Data_X11 *edata, Ecore_Evas_S
3918 Ecore_X_Selection_Data *x11_data = ev->data; 3913 Ecore_X_Selection_Data *x11_data = ev->data;
3919 result = _create_deliveriy_content(x11_data->length, x11_data->data, mime_type); 3914 result = _create_deliveriy_content(x11_data->length, x11_data->data, mime_type);
3920 } 3915 }
3921 EINA_SAFETY_ON_NULL_RETURN(result); 3916 EINA_SAFETY_ON_NULL_GOTO(result, err);
3922 3917
3923 //ensure that we deliver the correct type, we might have choosen a convertion before 3918 //ensure that we deliver the correct type, we might have choosen a convertion before
3924 if (edata->selection_data[selection].later_conversion != mime_type) 3919 if (edata->selection_data[selection].later_conversion != mime_type)
@@ -3934,6 +3929,12 @@ _deliver_content(Ecore_Evas *ee, Ecore_Evas_Engine_Data_X11 *edata, Ecore_Evas_S
3934 3929
3935 if (selection == ECORE_EVAS_SELECTION_BUFFER_DRAG_AND_DROP_BUFFER) 3930 if (selection == ECORE_EVAS_SELECTION_BUFFER_DRAG_AND_DROP_BUFFER)
3936 ecore_x_dnd_send_finished(); 3931 ecore_x_dnd_send_finished();
3932 return;
3933err:
3934 eina_promise_reject(edata->selection_data[selection].delivery, ecore_evas_no_selection);
3935
3936 if (selection == ECORE_EVAS_SELECTION_BUFFER_DRAG_AND_DROP_BUFFER)
3937 ecore_x_dnd_send_finished();
3937} 3938}
3938 3939
3939static Eina_Bool 3940static Eina_Bool