weston-launch: Only store drm fd if we successfully opened and stat'ed it
This commit is contained in:
parent
4a74d5a4a4
commit
af393dcc69
|
@ -333,7 +333,7 @@ err0:
|
|||
if (len < 0)
|
||||
return -1;
|
||||
|
||||
if (major(s.st_rdev) == DRM_MAJOR)
|
||||
if (fd != -1 && major(s.st_rdev) == DRM_MAJOR)
|
||||
wl->drm_fd = fd;
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue