diff options
-rw-r--r-- | common.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -124,7 +124,10 @@ const struct gbm * init_gbm(int drm_fd, int w, int h, uint32_t format, uint64_t modifier, bool surfaceless) { gbm.dev = gbm_create_device(drm_fd); - gbm.format = format; + if (!gbm.dev) + return NULL; + + gbm.format = format; gbm.surface = NULL; gbm.width = w; |