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
This commit is contained in:
Jan de Groot 2013-03-07 19:48:13 +01:00 committed by Marcin Slusarz
parent 057c46d791
commit 17f1cb1d99

View file

@ -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);
}
}