From: RALOVICH, Kristóf Date: Sun, 31 Jul 2011 21:49:43 +0000 (+0200) Subject: gbm/dri: avoid crash in dri_screen_create X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eeed782ecb9fa92a958cb650c0a5a536556dc611;p=mesa.git gbm/dri: avoid crash in dri_screen_create --- diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 6bb7848d830..9de8cb61162 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -194,6 +194,8 @@ dri_screen_create(struct gbm_dri_device *dri) dri->screen = dri->dri2->createNewScreen(0, dri->base.base.fd, dri->extensions, &dri->driver_configs, dri); + if (dri->screen == NULL) + return -1; extensions = dri->core->getExtensions(dri->screen); if (dri_bind_extensions(dri, dri_core_extensions, extensions) < 0) {