From: Paulo Zanoni Date: Thu, 13 Jan 2011 12:59:12 +0000 (-0800) Subject: dri_util: fail driCreateNewScreen if InitScreen is NULL X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dad914f6b2e5862a5174133f11276e975867be04;p=mesa.git dri_util: fail driCreateNewScreen if InitScreen is NULL Without this, X doesn't start with UMS on r300g. NOTE: This is a candidate for the 7.9 and 7.10 branches. Signed-off-by: Paulo Zanoni Signed-off-by: Brian Paul --- diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index a5b71bd40ad..bf8cf6eec07 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -790,6 +790,9 @@ driCreateNewScreen(int scrn, static const __DRIextension *emptyExtensionList[] = { NULL }; __DRIscreen *psp; + if (driDriverAPI.InitScreen == NULL) + return NULL; + psp = calloc(1, sizeof *psp); if (!psp) return NULL;