commit | af393dcc698bf5a08e00387cb226643a4c4ae005 | [log] [tgz] |
---|---|---|
author | Kristian Høgsberg <krh@bitplanet.net> | Wed Oct 09 11:25:14 2013 -0700 |
committer | Kristian Høgsberg <krh@bitplanet.net> | Thu Oct 10 16:50:18 2013 -0700 |
tree | 51a954143dac00ef64741eee2880c5a89d8d76eb | |
parent | 4a74d5a4a45423752105f865a8310ce878b1790a [diff] |
weston-launch: Only store drm fd if we successfully opened and stat'ed it
diff --git a/src/weston-launch.c b/src/weston-launch.c index 49b8964..e5301c7 100644 --- a/src/weston-launch.c +++ b/src/weston-launch.c
@@ -333,7 +333,7 @@ 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;