mirror of https://github.com/bkaradzic/bgfx
Fixed glXCreateContext crash due to use of freed memory.
This commit is contained in:
parent
81a712067d
commit
b02f87acc0
|
@ -449,12 +449,13 @@ namespace bgfx
|
|||
|
||||
XMapRaised(display, window);
|
||||
XFlush(display);
|
||||
XFree(visualInfo);
|
||||
|
||||
BX_TRACE("Create GL 2.1 context.");
|
||||
m_context = glXCreateContext(display, visualInfo, 0, GL_TRUE);
|
||||
BGFX_FATAL(NULL != m_context, Fatal::UnableToInitialize, "Failed to create GL 2.1 context.");
|
||||
|
||||
XFree(visualInfo);
|
||||
|
||||
typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
|
||||
glXCreateContextAttribsARBProc glXCreateContextAttribsARB = (glXCreateContextAttribsARBProc)glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB");
|
||||
if (NULL != glXCreateContextAttribsARB)
|
||||
|
|
Loading…
Reference in New Issue