summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
authorPaulo Zanoni <pzanoni@mandriva.com>2011-01-13 04:59:12 -0800
committerBrian Paul <brianp@vmware.com>2011-01-13 07:44:33 -0700
commitdad914f6b2e5862a5174133f11276e975867be04 (patch)
treeacf0de602b9b8e2ae50b06c165d4d4ed6c02daa0 /src/mesa/drivers/dri/common
parent9277a62aa3c1b2073dcfafcf34265b4d7154f4da (diff)
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 <pzanoni@mandriva.com> Signed-off-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index a5b71bd40a..bf8cf6eec0 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;