mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-08-06 07:25:14 +00:00
Defensive coding around glGetString()
This commit is contained in:
@@ -500,7 +500,11 @@ static void gldriver_init_common(void) {
|
||||
const char *vendor = (const char *)glGetString(GL_VENDOR);
|
||||
const char *renderer = (const char *)glGetString(GL_RENDERER);
|
||||
const char *version = (const char *)glGetString(GL_VERSION);
|
||||
LOG("GL_VENDOR:%s GL_RENDERER:%s GL_VERSION:%s", vendor, renderer, version);
|
||||
if (vendor && renderer && version) {
|
||||
LOG("GL_VENDOR:%s GL_RENDERER:%s GL_VERSION:%s", vendor, renderer, version);
|
||||
} else {
|
||||
RELEASE_LOG("One or more of GL_VENDOR, GL_RENDERER, and GL_VERSION is NULL ... possibly about to crash ...");
|
||||
}
|
||||
|
||||
if (vendor && strcasestr(vendor, "qualcomm")) {
|
||||
if (renderer && strcasestr(renderer, "adreno")) {
|
||||
|
Reference in New Issue
Block a user