[191] AppleSGLX/trunk/glxcurrent.c
Revision: 191 http://trac.macosforge.org/projects/xquartz/changeset/191 Author: gstaplin@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) {
participants (1)
-
source_changes@macosforge.org