svga: null out query's hwbuf pointer after destroying
authorBrian Paul <brianp@vmware.com>
Mon, 24 Mar 2014 23:21:34 +0000 (17:21 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 26 Mar 2014 16:31:13 +0000 (10:31 -0600)
Just to be extra safe.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/svga/svga_pipe_query.c

index cdf463c17814983b394f03c7ecda558052bc7320..0283aa907907d3aa6521be4a848ea84ad9611ce4 100644 (file)
@@ -148,6 +148,7 @@ svga_destroy_query(struct pipe_context *pipe, struct pipe_query *q)
    switch (sq->type) {
    case PIPE_QUERY_OCCLUSION_COUNTER:
       sws->buffer_destroy(sws, sq->hwbuf);
+      sq->hwbuf = NULL;
       sws->fence_reference(sws, &sq->fence, NULL);
       break;
    case SVGA_QUERY_DRAW_CALLS: