forked from enlightenment/efl
ecore wl2 - fix null checing of drag offer - coverity
fix CID 1378629
This commit is contained in:
parent
92e8935fa6
commit
9ee741cf7f
|
@ -253,22 +253,21 @@ _ecore_wl2_dnd_enter(Ecore_Wl2_Input *input, struct wl_data_offer *offer, struct
|
||||||
{
|
{
|
||||||
input->drag.offer = wl_data_offer_get_user_data(offer);
|
input->drag.offer = wl_data_offer_get_user_data(offer);
|
||||||
|
|
||||||
input->drag.offer->serial = serial;
|
if (input->drag.offer)
|
||||||
input->drag.offer->window_id = window->id;
|
|
||||||
|
|
||||||
if (input->display->wl.data_device_manager_version >=
|
|
||||||
WL_DATA_OFFER_SET_ACTIONS_SINCE_VERSION)
|
|
||||||
{
|
{
|
||||||
if (input->drag.offer)
|
input->drag.offer->serial = serial;
|
||||||
|
input->drag.offer->window_id = window->id;
|
||||||
|
|
||||||
|
if (input->display->wl.data_device_manager_version >=
|
||||||
|
WL_DATA_OFFER_SET_ACTIONS_SINCE_VERSION)
|
||||||
ecore_wl2_offer_actions_set(input->drag.offer,
|
ecore_wl2_offer_actions_set(input->drag.offer,
|
||||||
ECORE_WL2_DRAG_ACTION_MOVE | ECORE_WL2_DRAG_ACTION_COPY,
|
ECORE_WL2_DRAG_ACTION_MOVE |
|
||||||
ECORE_WL2_DRAG_ACTION_MOVE);
|
ECORE_WL2_DRAG_ACTION_COPY,
|
||||||
|
ECORE_WL2_DRAG_ACTION_MOVE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else input->drag.offer = NULL;
|
||||||
{
|
|
||||||
input->drag.offer = NULL;
|
|
||||||
}
|
|
||||||
input->drag.enter_serial = serial;
|
input->drag.enter_serial = serial;
|
||||||
input->drag.window_id = window->id;
|
input->drag.window_id = window->id;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue