mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
Fixed glXCreateContext crash due to use of freed memory.
This commit is contained in:
parent
81a712067d
commit
b02f87acc0
1 changed files with 2 additions and 1 deletions
|
@ -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 a new issue