Fixed segfault when GLX is missing
This commit is contained in:
parent
038a1c540c
commit
9543fbf3bb
|
@ -1572,6 +1572,10 @@ int QueryExtension(const GLubyte*extensions, const char *name)
|
||||||
const GLubyte *start;
|
const GLubyte *start;
|
||||||
GLubyte *where, *terminator;
|
GLubyte *where, *terminator;
|
||||||
|
|
||||||
|
if (extensions == NULL) {
|
||||||
|
extgl_error = 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
/* Extension names should not have spaces. */
|
/* Extension names should not have spaces. */
|
||||||
where = (GLubyte *) strchr(name, ' ');
|
where = (GLubyte *) strchr(name, ' ');
|
||||||
if (where || *name == '\0')
|
if (where || *name == '\0')
|
||||||
|
|
Loading…
Reference in New Issue