Revision: 262 http://trac.macosforge.org/projects/xquartz/changeset/262 Author: gstaplin@apple.com Date: 2009-02-25 23:49:45 -0800 (Wed, 25 Feb 2009) Log Message: ----------- Test if the drawable is the current drawable in a safer way. Before if the context was new and glXSwapBuffers was called without a drawable made current, it would likely crash while dereferencing NULL. We want it to generate a nice XError instead. Modified Paths: -------------- AppleSGLX/trunk/apple_glx_context.c Modified: AppleSGLX/trunk/apple_glx_context.c =================================================================== --- AppleSGLX/trunk/apple_glx_context.c 2009-02-26 07:12:59 UTC (rev 261) +++ AppleSGLX/trunk/apple_glx_context.c 2009-02-26 07:49:45 UTC (rev 262) @@ -489,7 +489,7 @@ assert(NULL != ac); - return (ac->drawable->drawable == drawable); + return (ac->drawable && ac->drawable->drawable == drawable); } /* Return true if an error occurred. */
participants (1)
-
source_changes@macosforge.org