winex11.drv: Copy the GL extensions string because it may be freed.

Ken Thomases ken at codeweavers.com
Wed Jan 24 23:51:24 CST 2007


This avoids a crash on Mac OS X.  Fixes bug 6979.
---
  dlls/winex11.drv/opengl.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
-------------- next part --------------
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index ebc980e..aaeb0a3 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -305,7 +305,7 @@ static BOOL X11DRV_WineGL_InitOpenglInfo
     }
 
     WineGLInfo.glVersion = (const char *) pglGetString(GL_VERSION);
-    WineGLInfo.glExtensions = (const char *) pglGetString(GL_EXTENSIONS);
+    WineGLInfo.glExtensions = strdup((const char *) pglGetString(GL_EXTENSIONS));
 
     /* Get the common GLX version supported by GLX client and server ( major/minor) */
     pglXQueryVersion(gdi_display, &WineGLInfo.glxVersion[0], &WineGLInfo.glxVersion[1]);


More information about the wine-patches mailing list