aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-04-02 23:52:53 +0000
committerBrian Paul <[email protected]>2002-04-02 23:52:53 +0000
commit99aab341998e84d9fa208c525cae8021b3845812 (patch)
tree2f3f6eb171c6c50228f1a2abe1e35abf96651f96
parentb63e8556fa9655bdfcc69fa04663e854f7fb2fbd (diff)
return NULL from Fake_glXCreateContext() if dpy or visinfo are NULL
-rw-r--r--src/mesa/drivers/x11/fakeglx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 1b5aeee44ad..037104d0ef4 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1,4 +1,4 @@
-/* $Id: fakeglx.c,v 1.61 2002/03/15 18:43:25 brianp Exp $ */
+/* $Id: fakeglx.c,v 1.62 2002/04/02 23:52:53 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1133,6 +1133,10 @@ Fake_glXCreateContext( Display *dpy, XVisualInfo *visinfo,
XMesaVisual glxvis;
struct fake_glx_context *glxCtx;
struct fake_glx_context *shareCtx = (struct fake_glx_context *) share_list;
+
+ if (!dpy || !visinfo)
+ return 0;
+
glxCtx = CALLOC_STRUCT(fake_glx_context);
if (!glxCtx)
return 0;