forked from enlightenment/efl
Ecore/Wayland: fix memory issue on exit.
When the application exits, an event cancels the DnD, that invokes the Wayland release of data source but this was not setting an internal pointer to NULL. ecore_wl_shutdown was then trying to use the same Wayland API on the non-set internal pointer (via _ecore_wl_input_del), that was leading to a segmentation fault. This bug never occurred because some bug in Copy&Paste was preventing it to reach this part of code.
This commit is contained in:
parent
96b767ef77
commit
067753eb2e
|
@ -764,12 +764,17 @@ _ecore_wl_dnd_source_cb_send_free(void *data EINA_UNUSED, void *event)
|
|||
}
|
||||
|
||||
static void
|
||||
_ecore_wl_dnd_source_cb_cancelled(void *data EINA_UNUSED, struct wl_data_source *source)
|
||||
_ecore_wl_dnd_source_cb_cancelled(void *data, struct wl_data_source *source)
|
||||
{
|
||||
Ecore_Wl_Input *input;
|
||||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
if (!(input = data)) return;
|
||||
|
||||
/* FIXME: Raise an Ecore_Wl_Event here */
|
||||
wl_data_source_destroy(source);
|
||||
if (input->data_source == source) input->data_source = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue