From 004dd015839dfb77b9d66fb2df6514feefb87d9e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 14 Feb 2011 06:26:56 +0100 Subject: [PATCH] r300g: fix reference counting when translating indices --- src/gallium/drivers/r300/r300_render_translate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/r300/r300_render_translate.c b/src/gallium/drivers/r300/r300_render_translate.c index dbc64ebf827..777857514fc 100644 --- a/src/gallium/drivers/r300/r300_render_translate.c +++ b/src/gallium/drivers/r300/r300_render_translate.c @@ -44,6 +44,7 @@ void r300_translate_index_buffer(struct r300_context *r300, &r300->context, *index_buffer, index_offset, *start, count, ptr); + *index_buffer = NULL; pipe_resource_reference(index_buffer, out_buffer); *index_size = 2; *start = out_offset / 2; @@ -59,6 +60,7 @@ void r300_translate_index_buffer(struct r300_context *r300, index_offset, *start, count, ptr); + *index_buffer = NULL; pipe_resource_reference(index_buffer, out_buffer); *start = out_offset / 2; r300->validate_buffers = TRUE; @@ -74,6 +76,7 @@ void r300_translate_index_buffer(struct r300_context *r300, index_offset, *start, count, ptr); + *index_buffer = NULL; pipe_resource_reference(index_buffer, out_buffer); *start = out_offset / 4; r300->validate_buffers = TRUE; -- 2.30.2