From 9543fbf3bb853c8a737a2b89e8e4cab837cee305 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 2 May 2003 21:18:01 +0000 Subject: [PATCH] Fixed segfault when GLX is missing --- src/native/common/extgl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/native/common/extgl.c b/src/native/common/extgl.c index 24cd1ea9..36cd2879 100644 --- a/src/native/common/extgl.c +++ b/src/native/common/extgl.c @@ -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')