From 17ec237c9b82ef7d8470be084f20f029bf373040 Mon Sep 17 00:00:00 2001 From: Albert Damen Date: Sun, 30 Aug 2009 23:51:05 +0200 Subject: [PATCH] intel: Fix crash when intel_context is destroyed. #22946. Only destroy the drawable from intel_context when it is still referenced from the driContext. Signed-off-by: Albert Damen --- src/mesa/drivers/dri/intel/intel_context.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 46f1a7f..e304fcc 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -866,7 +866,7 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv) __DRIdrawablePrivate * driDrawPriv = intel->driDrawable; struct intel_framebuffer *intel_fb; struct intel_renderbuffer *irbDepth, *irbStencil; - if (!driDrawPriv) { + if (!driDrawPriv || !driContextPriv->driDrawablePriv) { /* We're already detached from the drawable; exit this block. */ continue; } -- 1.6.3.3