diff options
author | Michel Dänzer <[email protected]> | 2007-02-28 17:42:54 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2007-02-28 17:42:54 +0100 |
commit | 3c578455e103664e6f93a7792999da7c06dd9a3f (patch) | |
tree | 2e998cc3275cfb692b67e3c25eb8659d6efec556 /src/mesa/drivers | |
parent | edf676cc5af26d8f82625a94788d4f27c464ab38 (diff) |
i915tex: Check that intel_rb is valid before trying to add it to an fbo.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i915tex/intel_fbo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i915tex/intel_fbo.c b/src/mesa/drivers/dri/i915tex/intel_fbo.c index ad078451bf2..8d430553822 100644 --- a/src/mesa/drivers/dri/i915tex/intel_fbo.c +++ b/src/mesa/drivers/dri/i915tex/intel_fbo.c @@ -81,14 +81,16 @@ intel_flip_renderbuffers(struct intel_framebuffer *intel_fb) int current_page = intel_fb->pf_current_page; int next_page = (current_page + 1) % intel_fb->pf_num_pages; - if (intel_fb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer != + if (intel_fb->color_rb[current_page] && + intel_fb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer != &intel_fb->color_rb[current_page]->Base) { _mesa_remove_renderbuffer(&intel_fb->Base, BUFFER_FRONT_LEFT); _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_FRONT_LEFT, &intel_fb->color_rb[current_page]->Base); } - if (intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer != + if (intel_fb->color_rb[next_page] && + intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer != &intel_fb->color_rb[next_page]->Base) { _mesa_remove_renderbuffer(&intel_fb->Base, BUFFER_BACK_LEFT); _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_BACK_LEFT, |