summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 f56b3b28074..6c119d564b9 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);
}
}