Mesa (7.9): dri_util: fail driCreateNewScreen if InitScreen is NULL

Alex Deucher agd5f at kemper.freedesktop.org
Tue Feb 22 20:25:41 UTC 2011


Module: Mesa
Branch: 7.9
Commit: 4996e4a845340cc37e24ecb808106cf5246f55aa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4996e4a845340cc37e24ecb808106cf5246f55aa

Author: Paulo Zanoni <pzanoni at mandriva.com>
Date:   Thu Jan 13 04:59:12 2011 -0800

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 at mandriva.com>
Signed-off-by: Brian Paul <brianp at vmware.com>

---

 src/mesa/drivers/dri/common/dri_util.c |    3 +++
 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 d46f622..c66dc9b 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -791,6 +791,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;




More information about the mesa-commit mailing list