projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http://www.tienza.es/crux/src/www.jwz.org/xscreensaver/xscreensaver-5.05.tar.gz
[xscreensaver]
/
hacks
/
glx
/
grab-ximage.c
diff --git
a/hacks/glx/grab-ximage.c
b/hacks/glx/grab-ximage.c
index 4fea33858b00f236d553597bc115f26fe7e8bb48..063e9e313dda407f1f4cddb30d56d68fb5887f22 100644
(file)
--- a/
hacks/glx/grab-ximage.c
+++ b/
hacks/glx/grab-ximage.c
@@
-1,5
+1,5
@@
/* grab-ximage.c --- grab the screen to an XImage for use with OpenGL.
/* grab-ximage.c --- grab the screen to an XImage for use with OpenGL.
- * xscreensaver, Copyright (c) 2001-200
6
Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 2001-200
8
Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@
-319,6
+319,9
@@
pixmap_to_gl_ximage (Screen *screen, Window window, Pixmap pixmap)
XGetGeometry (dpy, pixmap, &root, &x, &y, &width, &height, &bw, &depth);
}
XGetGeometry (dpy, pixmap, &root, &x, &y, &width, &height, &bw, &depth);
}
+ if (width < 5 || height < 5) /* something's gone wrong somewhere... */
+ return 0;
+
/* Convert the server-side Pixmap to a client-side GL-ordered XImage.
*/
# ifdef HAVE_XSHM_EXTENSION
/* Convert the server-side Pixmap to a client-side GL-ordered XImage.
*/
# ifdef HAVE_XSHM_EXTENSION