[Xquartz-changes] [191] AppleSGLX/trunk/glxcurrent.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Feb 19 19:51:11 PST 2009
Revision: 191
http://trac.macosforge.org/projects/xquartz/changeset/191
Author: gstaplin at apple.com
Date: 2009-02-19 19:51:10 -0800 (Thu, 19 Feb 2009)
Log Message:
-----------
Avoid a crash if the previous current context was NULL,
and the new current context is NULL, by avoiding the
dereference of a NULL pointer.
Modified Paths:
--------------
AppleSGLX/trunk/glxcurrent.c
Modified: AppleSGLX/trunk/glxcurrent.c
===================================================================
--- AppleSGLX/trunk/glxcurrent.c 2009-02-20 03:41:00 UTC (rev 190)
+++ AppleSGLX/trunk/glxcurrent.c 2009-02-20 03:51:10 UTC (rev 191)
@@ -152,8 +152,10 @@
* cannot be NULL, therefore if they are the same, gc is not
* NULL and not the dummy.
*/
- gc->currentDrawable = draw;
- gc->currentReadable = read;
+ if(gc) {
+ gc->currentDrawable = draw;
+ gc->currentReadable = read;
+ }
} else {
if (oldGC != &dummyContext) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20090219/539be65c/attachment.html>
More information about the Xquartz-changes
mailing list