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

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

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

Reply via email to