Merge pull request #2185 from degasus/master

GLX: fix memory leak
This commit is contained in:
Ryan Houdek 2015-03-08 11:54:50 -05:00
commit d34e908c4e
2 changed files with 3 additions and 2 deletions

View File

@ -92,7 +92,7 @@ bool cInterfaceGLX::Create(void *window_handle)
XFree(fbc);
// Get an appropriate visual
vi = glXGetVisualFromFBConfig(dpy, fbconfig);
XVisualInfo* vi = glXGetVisualFromFBConfig(dpy, fbconfig);
// Create a GLX context.
// We try to get a 3.3 core profile, else we try it with anything we get.
@ -142,6 +142,8 @@ bool cInterfaceGLX::Create(void *window_handle)
s_backbuffer_height = attribs.height;
win = XWindow.CreateXWindow(parent, vi);
XFree(vi);
return true;
}

View File

@ -17,7 +17,6 @@ private:
Display *dpy;
Window win;
GLXContext ctx;
XVisualInfo *vi;
GLXFBConfig fbconfig;
public:
friend class cX11Window;