summaryrefslogtreecommitdiffstats
path: root/src/glx/dri2_glx.c
diff options
context:
space:
mode:
authorStéphane Marchesin <[email protected]>2011-06-03 17:03:09 -0700
committerStéphane Marchesin <[email protected]>2011-06-06 12:35:59 -0700
commit3d3ecb8520ccca0863026a94e7fda9840aff6c0a (patch)
tree0ecbc8a1e3d209b721e6abfaa4ae8d6eea264eec /src/glx/dri2_glx.c
parentcec2082ae515bc91e6b29084ba4b8deac28ef923 (diff)
dri2: protect dri2FlushFrontBuffer against NULL buffers.
Diffstat (limited to 'src/glx/dri2_glx.c')
-rw-r--r--src/glx/dri2_glx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 69b47ae45e2..506754ccc1f 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -457,6 +457,12 @@ static void
dri2FlushFrontBuffer(__DRIdrawable *driDrawable, void *loaderPrivate)
{
struct dri2_drawable *pdraw = loaderPrivate;
+ if (!pdraw)
+ return;
+
+ if (!pdraw->base.psc)
+ return;
+
struct glx_display *priv = __glXInitialize(pdraw->base.psc->dpy);
struct dri2_display *pdp = (struct dri2_display *)priv->dri2Display;
struct glx_context *gc = __glXGetCurrentContext();