summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-12-09 16:23:03 +0000
committerBrian Paul <[email protected]>2004-12-09 16:23:03 +0000
commit8597dd3e96fdf36d3b6e13b4014c2fd064e99050 (patch)
treebf13cd60ac7dd7cfe1815bdead88861563d83500 /src/mesa/drivers
parentda3e15c2fd5c08a7f28c1bda5a2f3298a8b09a15 (diff)
check if using a PBuffer in clip_for_xgetimage()
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/x11/xm_span.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/x11/xm_span.c b/src/mesa/drivers/x11/xm_span.c
index 3ebca32bcfe..594554469c9 100644
--- a/src/mesa/drivers/x11/xm_span.c
+++ b/src/mesa/drivers/x11/xm_span.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 5.1
+ * Version: 6.3
*
- * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -3473,6 +3473,8 @@ clip_for_xgetimage(XMesaContext xmesa, GLuint *n, GLint *x, GLint *y)
Window child;
GLint screenWidth = WidthOfScreen(DefaultScreenOfDisplay(xmesa->display));
GLint dx, dy;
+ if (source->type == PBUFFER)
+ return 0;
XTranslateCoordinates(xmesa->display, source->buffer, rootWin,
*x, *y, &dx, &dy, &child);
if (dx >= screenWidth) {