summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2017-09-18 18:50:06 -0700
committerKenneth Graunke <[email protected]>2017-09-18 18:51:26 -0700
commitb339d63f0d0337df918c7aed471b90c02401bdb7 (patch)
treebd16e1d2e727fc48163f259df03e6d1e189c1153 /src
parent4db9ad98939711e5c00e9ffb196614fcd9a98ad8 (diff)
i965: Fix batch map failure check in INTEL_DEBUG=bat handling.
I originally wrote the code to call the maps 'batch' and 'state', until I remembered that 'batch' is the intel_batchbuffer struct pointer. The NULL check was still using the wrong variable. Caught by Coverity. CID: 1418109
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/intel_batchbuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
index 7d5a8947e8f..6a16771fc6d 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -439,7 +439,7 @@ do_batch_dump(struct brw_context *brw)
uint32_t *batch_data = brw_bo_map(brw, batch->bo, MAP_READ);
uint32_t *state = brw_bo_map(brw, batch->state_bo, MAP_READ);
- if (batch == NULL || state == NULL) {
+ if (batch_data == NULL || state == NULL) {
fprintf(stderr, "WARNING: failed to map batchbuffer/statebuffer\n");
return;
}