ecore-drm: Fix ecore_drm_launcher_device_close to not cause segfaults

Summary: We can only call _ecore_drm_logind_device_close if we have an
actual device string. It is possible that this Could get called with
NULL, and thus cause a crash.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-12-09 15:12:36 -05:00
parent 7da19b4c21
commit a5654dbb24
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ _ecore_drm_launcher_device_open_no_pending(const char *device, int flags)
void
_ecore_drm_launcher_device_close(const char *device, int fd)
{
if (logind)
if ((logind) && (device))
return _ecore_drm_logind_device_close(device);
close(fd);