virgl/egl: check fd is valid.

macos/master
Dave Airlie 10 years ago
parent 5a72d1b3d3
commit 553ae3fbd6
  1. 2
      src/virgl_egl_context.c

@ -144,6 +144,8 @@ struct virgl_egl *virgl_egl_init(void)
return NULL; return NULL;
d->fd = egl_rendernode_open(); d->fd = egl_rendernode_open();
if (d->fd == -1)
goto fail;
d->gbm_dev = gbm_create_device(d->fd); d->gbm_dev = gbm_create_device(d->fd);
if (!d->gbm_dev) if (!d->gbm_dev)
goto fail; goto fail;

Loading…
Cancel
Save