From: Xiang, Haihao Date: Thu, 6 Mar 2008 01:41:41 +0000 (+0800) Subject: i965:fix segfault issue when clearing the window which X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=771ba666290150dcebeefa5d6bbf4254f95c1c26;p=mesa.git i965:fix segfault issue when clearing the window which is created with mode GLUT_SINGLE|GLUT_RGB|GLUT_DEPTH. This issue is introduced by 20b8bff49cba3e8246e29004c5ff38f231d589ff --- diff --git a/src/mesa/drivers/dri/i965/brw_metaops.c b/src/mesa/drivers/dri/i965/brw_metaops.c index dd62be34f4a..7b34f0f3bd6 100644 --- a/src/mesa/drivers/dri/i965/brw_metaops.c +++ b/src/mesa/drivers/dri/i965/brw_metaops.c @@ -372,7 +372,8 @@ static void meta_draw_region( struct intel_context *intel, if (intel->frame_buffer_texobj != NULL) brw_FrameBufferTexDestroy(brw); - brw_FrameBufferTexInit(brw, draw_region); + if (draw_region) + brw_FrameBufferTexInit(brw, draw_region); brw->state.dirty.mesa |= _NEW_BUFFERS; }