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

Brian Paul brianp at kemper.freedesktop.org
Thu Jan 13 06:44:51 PST 2011


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

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