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

Alex Deucher agd5f at kemper.freedesktop.org
Tue Feb 22 20:33:34 UTC 2011


Module: Mesa
Branch: 7.10
Commit: f0fa040d947742e6ba9cbde486044e7881323784
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f0fa040d947742e6ba9cbde486044e7881323784

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 a5b71bd..bf8cf6e 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;




More information about the mesa-commit mailing list