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,