summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>1999-12-01 12:45:42 +0000
committerKeith Whitwell <keith@tungstengraphics.com>1999-12-01 12:45:42 +0000
commite99e1264794aa29d622ab414a667e54f453798ba (patch)
tree9e52842f1e2b98a4b347740451c5f4874dacb2c0
parent98fce326833e7a66584d189e8201a3ed9f703756 (diff)
check ctx before dereferencing it
-rw-r--r--src/mesa/main/context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 0ae5aba57d..dcb0eeffac 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1,4 +1,4 @@
-/* $Id: context.c,v 1.18.2.4 1999/11/30 20:31:57 brianp Exp $ */
+/* $Id: context.c,v 1.18.2.5 1999/12/01 12:45:42 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -1571,7 +1571,7 @@ void gl_make_current( GLcontext *ctx, GLframebuffer *buffer )
* first time each context is made current we'll print some useful
* information.
*/
- if (ctx->FirstTimeCurrent) {
+ if (ctx && ctx->FirstTimeCurrent) {
if (getenv("MESA_INFO")) {
fprintf(stderr, "Mesa GL_VERSION = %s\n", (char *) gl_GetString(ctx, GL_VERSION));
fprintf(stderr, "Mesa GL_RENDERER = %s\n", (char *) gl_GetString(ctx, GL_RENDERER));