diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2020-06-28 22:52:17 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2020-06-28 22:52:17 +0100 |
commit | 9932ceeec3b4a17e6ccd6d6d3477466331547fff (patch) | |
tree | 3be3bbae41f23f4a36176f7d8a1037583a0bf1a3 | |
parent | a733f9c233aed3e02670ccb317d201bee31305b7 (diff) |
ecore evas wl - cnp - dont segv is data is null
this is probably wrong but crashing is not nice... bettr to NOP than
crash right now.
-rw-r--r-- | src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 8142f0999b..44d99a7e34 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c | |||
@@ -2714,6 +2714,11 @@ _wl_selection_receive(void *data, int type EINA_UNUSED, void *event) | |||
2714 | Ecore_Wl2_Event_Offer_Data_Ready *ready = event; | 2714 | Ecore_Wl2_Event_Offer_Data_Ready *ready = event; |
2715 | Ecore_Evas_Selection_Buffer selection = ECORE_EVAS_SELECTION_BUFFER_LAST; | 2715 | Ecore_Evas_Selection_Buffer selection = ECORE_EVAS_SELECTION_BUFFER_LAST; |
2716 | 2716 | ||
2717 | if ((!ready->data) || (ready->len < 1)) | ||
2718 | { | ||
2719 | ERR("no se;lection data"); | ||
2720 | return ECORE_CALLBACK_PASS_ON; | ||
2721 | } | ||
2717 | for (int i = 0; i < ECORE_EVAS_SELECTION_BUFFER_LAST; ++i) | 2722 | for (int i = 0; i < ECORE_EVAS_SELECTION_BUFFER_LAST; ++i) |
2718 | { | 2723 | { |
2719 | if (wdata->selection_data[i].offer == ready->offer) | 2724 | if (wdata->selection_data[i].offer == ready->offer) |