summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/i965/brw_queryobj.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index 0881ab93893..0cdfa6e486b 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -404,12 +404,12 @@ brw_end_query(struct gl_context *ctx, struct gl_query_object *q)
brw_emit_query_begin(brw);
}
- if (query->bo) {
- brw_emit_query_end(brw);
+ assert(query->bo);
- drm_intel_bo_unreference(brw->query.bo);
- brw->query.bo = NULL;
- }
+ brw_emit_query_end(brw);
+
+ drm_intel_bo_unreference(brw->query.bo);
+ brw->query.bo = NULL;
brw->query.obj = NULL;