summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan de Groot <jan@jgc.homeip.net>2013-03-07 19:48:13 +0100
committerAndreas Boll <andreas.boll.dev@gmail.com>2013-04-17 12:54:07 +0200
commit3454bbf12b4d05c8a0cb3e155864b9272363fa8f (patch)
tree4613b12c5809ee1a67882102e73131dd1f18b26c
parentee877de37c5d21286490f018ea891009fefcdd21 (diff)
dri/nouveau: fix crash in nouveau_flush
https://bugs.freedesktop.org/show_bug.cgi?id=61947 Note: this is a candidate for the stable branches (cherry picked from commit 17f1cb1d99e66227d1e05925ef937643f5c1089a)
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_driver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_driver.c b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
index e824d1072a..0e386a9a77 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_driver.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_driver.c
@@ -69,7 +69,8 @@ nouveau_flush(struct gl_context *ctx)
__DRIdri2LoaderExtension *dri2 = screen->dri2.loader;
__DRIdrawable *drawable = nctx->dri_context->driDrawablePriv;
- dri2->flushFrontBuffer(drawable, drawable->loaderPrivate);
+ if (drawable && drawable->loaderPrivate)
+ dri2->flushFrontBuffer(drawable, drawable->loaderPrivate);
}
}