Fixed segfault when GLX is missing

This commit is contained in:
Elias Naur 2003-05-02 21:18:01 +00:00
parent 038a1c540c
commit 9543fbf3bb
1 changed files with 4 additions and 0 deletions

View File

@ -1572,6 +1572,10 @@ int QueryExtension(const GLubyte*extensions, const char *name)
const GLubyte *start;
GLubyte *where, *terminator;
if (extensions == NULL) {
extgl_error = 1;
return 0;
}
/* Extension names should not have spaces. */
where = (GLubyte *) strchr(name, ' ');
if (where || *name == '\0')