Merge branch '7.8' into master
[mesa.git] / src / mesa / state_tracker / st_cb_queryobj.c
index 2281d10e99960c5b4c3f9f9792dac628a151ffb0..c66729b1244336e35a5f47b8e04fad934d16e22b 100644 (file)
@@ -69,7 +69,7 @@ st_DeleteQuery(GLcontext *ctx, struct gl_query_object *q)
       stq->pq = NULL;
    }
 
-   _mesa_free(stq);
+   free(stq);
 }
 
 
@@ -130,13 +130,8 @@ st_CheckQuery(GLcontext *ctx, struct gl_query_object *q)
 {
    struct pipe_context *pipe = ctx->st->pipe;
    struct st_query_object *stq = st_query_object(q);
-
-   if (!q->Ready) {
-      q->Ready = pipe->get_query_result(pipe, 
-                                       stq->pq,
-                                       FALSE,
-                                       &q->Result);
-   }
+   assert(!q->Ready);   /* we should not get called if Ready is TRUE */
+   q->Ready = pipe->get_query_result(pipe, stq->pq, FALSE, &q->Result);
 }