From f82f1ffba9f2e5971a6a3f3927ae3b22b798bab2 Mon Sep 17 00:00:00 2001
From: Eric Anholt <eric@anholt.net>
Date: Sun, 8 Feb 2009 15:39:51 +0100
Subject: intel: don't crash when dri2 tells us about buffers we don't care
 about.

---
 src/mesa/drivers/dri/intel/intel_context.c | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src/mesa')

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 0d9487b99ad..7a93801ee08 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -254,6 +254,9 @@ intel_update_renderbuffers(__DRIcontext *context, __DRIdrawable *drawable)
 	   return;
        }
 
+       if (rb == NULL)
+	  continue;
+
        if (rb->region) {
 	  dri_bo_flink(rb->region->buffer, &name);
 	  if (name == buffers[i].name)
-- 
cgit v1.2.3