summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/getstring.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c
index 748a9435746..9c9ade35955 100644
--- a/src/mesa/main/getstring.c
+++ b/src/mesa/main/getstring.c
@@ -126,6 +126,10 @@ _mesa_GetString( GLenum name )
case GL_VERSION:
return (const GLubyte *) ctx->VersionString;
case GL_EXTENSIONS:
+ if (ctx->API == API_OPENGL_CORE) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetString(GL_EXTENSIONS)");
+ return (const GLubyte *) 0;
+ }
return (const GLubyte *) ctx->Extensions.String;
#if FEATURE_ARB_shading_language_100 || FEATURE_ES2
case GL_SHADING_LANGUAGE_VERSION: