Module: Mesa
Branch: 9.1
Commit: 5aacecb08c26303f43d5813d2239f58d22c61245
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5aacecb08c26303f43d5813d2239f58d22c61245

Author: Jan de Groot <[email protected]>
Date:   Thu Mar  7 19:48:13 2013 +0100

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)

---

 src/mesa/drivers/dri/nouveau/nouveau_driver.c |    3 ++-
 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 f56b3b2..6c119d5 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);
        }
 }
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to