From dad914f6b2e5862a5174133f11276e975867be04 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Thu, 13 Jan 2011 04:59:12 -0800 Subject: [PATCH] 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 --- src/mesa/drivers/dri/common/dri_util.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.30.2