draw: fix translate double-free, minor cleanups

This commit is contained in:
Keith Whitwell 2008-05-09 15:02:59 +01:00
parent 2f9b1b9cc2
commit 5ee2b5bdcc
3 changed files with 4 additions and 5 deletions

View File

@ -427,9 +427,6 @@ static void vbuf_destroy( struct draw_stage *stage )
if(vbuf->indices)
align_free( vbuf->indices );
if(vbuf->translate)
vbuf->translate->release( vbuf->translate );
if (vbuf->render)
vbuf->render->destroy( vbuf->render );

View File

@ -184,7 +184,8 @@ struct pt_fetch *draw_pt_fetch_create( struct draw_context *draw )
void draw_pt_fetch_destroy( struct pt_fetch *fetch )
{
translate_cache_destroy(fetch->cache);
if (fetch->cache)
translate_cache_destroy(fetch->cache);
FREE(fetch);
}

View File

@ -268,7 +268,8 @@ static void fetch_emit_destroy( struct draw_pt_middle_end *middle )
{
struct fetch_emit_middle_end *feme = (struct fetch_emit_middle_end *)middle;
translate_cache_destroy(feme->cache);
if (feme->cache)
translate_cache_destroy(feme->cache);
FREE(middle);
}