summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/pipebuffer/pb_buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/pipebuffer/pb_buffer.h')
-rw-r--r--src/gallium/auxiliary/pipebuffer/pb_buffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/pipebuffer/pb_buffer.h b/src/gallium/auxiliary/pipebuffer/pb_buffer.h
index 4ef372233f..eb7e84be84 100644
--- a/src/gallium/auxiliary/pipebuffer/pb_buffer.h
+++ b/src/gallium/auxiliary/pipebuffer/pb_buffer.h
@@ -237,8 +237,9 @@ pb_reference(struct pb_buffer **dst,
{
struct pb_buffer *old = *dst;
- if (pipe_reference((struct pipe_reference**)dst, &src->base.reference))
+ if (pipe_reference(&(*dst)->base.reference, &src->base.reference))
pb_destroy( old );
+ *dst = src;
}