[Xquartz-changes] [371] AppleSGLX/trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 30 12:11:02 PDT 2009


Revision: 371
          http://trac.macosforge.org/projects/xquartz/changeset/371
Author:   jeremyhu at freedesktop.org
Date:     2009-09-30 12:11:00 -0700 (Wed, 30 Sep 2009)
Log Message:
-----------
Don't crash when trying to initialize GLX when run as a remote client.

This should fix the crash mentioned in ticket #317

Modified Paths:
--------------
    AppleSGLX/trunk/glxcmds.c
    AppleSGLX/trunk/glxext.c

Modified: AppleSGLX/trunk/glxcmds.c
===================================================================
--- AppleSGLX/trunk/glxcmds.c	2009-09-17 01:21:29 UTC (rev 370)
+++ AppleSGLX/trunk/glxcmds.c	2009-09-30 19:11:00 UTC (rev 371)
@@ -1401,6 +1401,10 @@
     int   i;
 
     *nelements = 0;
+
+    if(!priv)
+        return NULL;
+
     if ( (priv->screenConfigs != NULL)
 	 && (screen >= 0) && (screen <= ScreenCount(dpy))
 	 && (priv->screenConfigs[screen].configs != NULL)

Modified: AppleSGLX/trunk/glxext.c
===================================================================
--- AppleSGLX/trunk/glxext.c	2009-09-17 01:21:29 UTC (rev 370)
+++ AppleSGLX/trunk/glxext.c	2009-09-30 19:11:00 UTC (rev 371)
@@ -758,9 +758,8 @@
     if (glx_direct)
 	dpyPriv->driswDisplay = driswCreateDisplay(dpy);
 #endif
-    apple_init_glx(dpy);
 
-    if (!AllocAndFetchScreenConfigs(dpy, dpyPriv)) {
+    if (apple_init_glx(dpy) || !AllocAndFetchScreenConfigs(dpy, dpyPriv)) {
 	__glXUnlock();
 	Xfree((char*) dpyPriv);
 	Xfree((char*) private);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/xquartz-changes/attachments/20090930/00f34eb2/attachment.html>


More information about the Xquartz-changes mailing list