[Xquartz-changes] [168] AppleSGLX/trunk/apple_glx_pixmap.c
source_changes at macosforge.org
source_changes at macosforge.org
Wed Feb 18 03:28:00 PST 2009
Revision: 168
http://trac.macosforge.org/projects/xquartz/changeset/168
Author: gstaplin at apple.com
Date: 2009-02-18 03:28:00 -0800 (Wed, 18 Feb 2009)
Log Message:
-----------
If the current CGL context is from a GLXPixmap then set the
CGL context to NULL when destroying the GLXPimap.
Note: the previous commit also fixed a bug in free() ordering.
Modified Paths:
--------------
AppleSGLX/trunk/apple_glx_pixmap.c
Modified: AppleSGLX/trunk/apple_glx_pixmap.c
===================================================================
--- AppleSGLX/trunk/apple_glx_pixmap.c 2009-02-18 11:23:56 UTC (rev 167)
+++ AppleSGLX/trunk/apple_glx_pixmap.c 2009-02-18 11:28:00 UTC (rev 168)
@@ -174,6 +174,10 @@
lock_pixmap_list();
if(find_pixmap(pixmap, &p)) {
+ if(p->context_obj == apple_cgl.get_current_context()) {
+ apple_cgl.set_current_context(NULL);
+ }
+
(void)apple_cgl.destroy_pixel_format(p->pixel_format_obj);
(void)apple_cgl.destroy_context(p->context_obj);
XAppleDRIDestroyPixmap(dpy, pixmap);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20090218/3f529ab8/attachment-0001.html>
More information about the Xquartz-changes
mailing list