From: Jan de Groot Date: Thu, 7 Mar 2013 18:48:13 +0000 (+0100) Subject: dri/nouveau: fix crash in nouveau_flush X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=17f1cb1d99e66227d1e05925ef937643f5c1089a;p=mesa.git 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 --- 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); } }