Merge pull request #327 from davg-qqq/fix-osmesa-crash
Fix unhandled null causing crash when using osmesa with nvidia driver
This commit is contained in:
commit
1cc14031c9
|
@ -2033,8 +2033,11 @@ void OpenGLRenderer_3_2::GetExtensionSet(std::set<std::string> *oglExtensionSet)
|
||||||
glGetIntegerv(GL_NUM_EXTENSIONS, &extensionCount);
|
glGetIntegerv(GL_NUM_EXTENSIONS, &extensionCount);
|
||||||
for (size_t i = 0; i < extensionCount; i++)
|
for (size_t i = 0; i < extensionCount; i++)
|
||||||
{
|
{
|
||||||
std::string extensionName = std::string((const char *)glGetStringi(GL_EXTENSIONS, i));
|
const char * extensionName = (const char *)glGetStringi(GL_EXTENSIONS, i);
|
||||||
oglExtensionSet->insert(extensionName);
|
if (extensionName == NULL) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
oglExtensionSet->insert(std::string(extensionName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue