summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-03-03 19:56:11 +0000
committerIan Romanick <idr@us.ibm.com>2005-03-03 19:56:11 +0000
commit6e776f25fd4d275722494824e2d5149a25ed4036 (patch)
treec238e62bdf2d65d03ec4a76b771d016824e7438b /src
parentc1f2f9090bcca309b9aeef7ae57acc280704db81 (diff)
When building in the X-Server, attr.depth doesn't exist. Instead, use
(XMesaDrawable)w)->depth in the error message.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/x11/xm_api.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index 6df7d9a786..55fc86748e 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -1740,14 +1740,17 @@ XMesaBuffer XMesaCreateWindowBuffer2( XMesaVisual v, XMesaWindow w,
#ifdef XFree86Server
if (GET_VISUAL_DEPTH(v) != ((XMesaDrawable)w)->depth) {
+ _mesa_warning(NULL, "XMesaCreateWindowBuffer: depth mismatch between visual and window! (%d != %d)\n", GET_VISUAL_DEPTH(v) , ((XMesaDrawable)w)->depth );
+ return NULL;
+ }
#else
XGetWindowAttributes( v->display, w, &attr );
if (GET_VISUAL_DEPTH(v) != attr.depth) {
-#endif
_mesa_warning(NULL, "XMesaCreateWindowBuffer: depth mismatch between visual and window! (%d != %d)\n", GET_VISUAL_DEPTH(v) , attr.depth );
return NULL;
}
+#endif
b->xm_visual = v;
b->type = WINDOW;