weston-launch: Only store drm fd if we successfully opened and stat'ed it

dev
Kristian Høgsberg 11 years ago
parent 4a74d5a4a4
commit af393dcc69
  1. 2
      src/weston-launch.c

@ -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…
Cancel
Save