summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-28 15:23:05 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-09-28 15:28:00 +0900
commit9ee741cf7fb5ff4f71bc041ee9cdaadf5000d8d3 (patch)
treeb6cd8fe5bb92fb5d799f0f3e073ccba6b527eb3f /src/lib/ecore_wl2
parent92e8935fa637ae2f3cfa185589b298de4cee235a (diff)
ecore wl2 - fix null checing of drag offer - coverity
fix CID 1378629
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_dnd.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_dnd.c b/src/lib/ecore_wl2/ecore_wl2_dnd.c
index 4a170843ab..b3fcb458e6 100644
--- a/src/lib/ecore_wl2/ecore_wl2_dnd.c
+++ b/src/lib/ecore_wl2/ecore_wl2_dnd.c
@@ -253,22 +253,21 @@ _ecore_wl2_dnd_enter(Ecore_Wl2_Input *input, struct wl_data_offer *offer, struct
253 { 253 {
254 input->drag.offer = wl_data_offer_get_user_data(offer); 254 input->drag.offer = wl_data_offer_get_user_data(offer);
255 255
256 input->drag.offer->serial = serial; 256 if (input->drag.offer)
257 input->drag.offer->window_id = window->id;
258
259 if (input->display->wl.data_device_manager_version >=
260 WL_DATA_OFFER_SET_ACTIONS_SINCE_VERSION)
261 { 257 {
262 if (input->drag.offer) 258 input->drag.offer->serial = serial;
259 input->drag.offer->window_id = window->id;
260
261 if (input->display->wl.data_device_manager_version >=
262 WL_DATA_OFFER_SET_ACTIONS_SINCE_VERSION)
263 ecore_wl2_offer_actions_set(input->drag.offer, 263 ecore_wl2_offer_actions_set(input->drag.offer,
264 ECORE_WL2_DRAG_ACTION_MOVE | ECORE_WL2_DRAG_ACTION_COPY, 264 ECORE_WL2_DRAG_ACTION_MOVE |
265 ECORE_WL2_DRAG_ACTION_MOVE); 265 ECORE_WL2_DRAG_ACTION_COPY,
266 ECORE_WL2_DRAG_ACTION_MOVE);
266 } 267 }
267 } 268 }
268 else 269 else input->drag.offer = NULL;
269 { 270
270 input->drag.offer = NULL;
271 }
272 input->drag.enter_serial = serial; 271 input->drag.enter_serial = serial;
273 input->drag.window_id = window->id; 272 input->drag.window_id = window->id;
274 273