Fixed rare crash within OpenGL::[GetRendererName|GetVendorName]

Former-commit-id: a5b12a391178eef87129c9c8c9a58e7016a6279b
This commit is contained in:
Lynix 2013-08-12 22:03:46 +02:00
parent 5bc3d3b46e
commit cbc92364f4
1 changed files with 4 additions and 4 deletions

View File

@ -73,8 +73,8 @@ namespace
std::set<NzString> s_openGLextensionSet; std::set<NzString> s_openGLextensionSet;
std::unordered_map<NzContext*, ContextStates> s_contexts; std::unordered_map<NzContext*, ContextStates> s_contexts;
thread_local ContextStates* s_contextStates = nullptr; thread_local ContextStates* s_contextStates = nullptr;
const char* s_rendererName = nullptr; NzString s_rendererName;
const char* s_vendorName = nullptr; NzString s_vendorName;
bool s_initialized = false; bool s_initialized = false;
bool s_openGLextensions[nzOpenGLExtension_Max+1] = {false}; bool s_openGLextensions[nzOpenGLExtension_Max+1] = {false};
unsigned int s_glslVersion = 0; unsigned int s_glslVersion = 0;
@ -1206,8 +1206,8 @@ void NzOpenGL::Uninitialize()
s_initialized = false; s_initialized = false;
s_openGLextensionSet.clear(); s_openGLextensionSet.clear();
s_openglVersion = 0; s_openglVersion = 0;
s_rendererName = nullptr; s_rendererName.Clear(false);
s_vendorName = nullptr; s_vendorName.Clear(false);
UnloadLibrary(); UnloadLibrary();
} }