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>
This commit is contained in:
Paulo Zanoni 2011-01-13 04:59:12 -08:00 committed by Alex Deucher
parent b847da213e
commit f0fa040d94

View file

@ -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;