ecore-drm: Don't crash if we get no devpath from Eeze

Summary: During a device remove event, we should check that Eeze has
returned us a devpath to remove else we segfault when trying to strcmp
the device path later during actual remove.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-09-25 12:04:23 -04:00
parent 44e2cde623
commit 2bc462f55b
1 changed files with 5 additions and 3 deletions

View File

@ -228,9 +228,11 @@ _cb_input_event(const char *device, Eeze_Udev_Event event, void *data, Eeze_Udev
{
const char *node;
node = eeze_udev_syspath_get_devpath(device);
_device_remove(input, node);
eina_stringshare_del(node);
if ((node = eeze_udev_syspath_get_devpath(device)))
{
_device_remove(input, node);
eina_stringshare_del(node);
}
}
break;
default: