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

Author: Paulo Zanoni <pzan...@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 <pzan...@mandriva.com>
Signed-off-by: Brian Paul <bri...@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;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to