ecore-drm: Free devices before we release the libinput reference

Summary: When destroying evdev devices, we make calls to
libinput_device_unref ... but we cannot Make that call if the libinput
context has been destroyed already (as happens when we free input). So
to fix, don't release the libinput context until all devices have been
released.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-12-10 14:26:52 -05:00
parent 251c300b8f
commit 0b77b7f59f
1 changed files with 7 additions and 7 deletions

View File

@ -295,13 +295,6 @@ ecore_drm_inputs_destroy(Ecore_Drm_Device *dev)
Ecore_Drm_Seat *seat;
Ecore_Drm_Evdev *edev;
EINA_LIST_FREE(dev->inputs, input)
{
if (input->hdlr) ecore_main_fd_handler_del(input->hdlr);
if (input->libinput) libinput_unref(input->libinput);
free(input);
}
EINA_LIST_FREE(dev->seats, seat)
{
EINA_LIST_FREE(seat->devices, edev)
@ -310,6 +303,13 @@ ecore_drm_inputs_destroy(Ecore_Drm_Device *dev)
if (seat->name) eina_stringshare_del(seat->name);
free(seat);
}
EINA_LIST_FREE(dev->inputs, input)
{
if (input->hdlr) ecore_main_fd_handler_del(input->hdlr);
if (input->libinput) libinput_unref(input->libinput);
free(input);
}
}
EAPI Eina_Bool