summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-09-21 10:08:11 +0200
committerMichel Dänzer <[email protected]>2009-09-21 10:28:37 +0200
commit999592745f40a96a7307da374cab4d68254acf75 (patch)
treede8ce099012bb554f37ae6f4368b85c96c44de87 /src/mesa/drivers/dri/intel
parentc4ce6f6a7c124c62a8ee9bd9fba28fc69a38e18c (diff)
intel: Fix crash in intel_flush().
Since commit 2921a2555d0a76fa649b23c31e3264bbc78b2ff5 ('intel: Deassociated drawables from private context struct in intelUnbindContext'), intel->driDrawable may be NULL in intel_flush().
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r--src/mesa/drivers/dri/intel/intel_context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 7fa70e428d0..e593b236a79 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -500,7 +500,8 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
if (screen->dri2.loader &&
(screen->dri2.loader->base.version >= 2)
- && (screen->dri2.loader->flushFrontBuffer != NULL)) {
+ && (screen->dri2.loader->flushFrontBuffer != NULL) &&
+ intel->driDrawable && intel->driDrawable->loaderPrivate) {
(*screen->dri2.loader->flushFrontBuffer)(intel->driDrawable,
intel->driDrawable->loaderPrivate);