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
This commit is contained in:
Kenneth Graunke
2017-09-18 18:50:06 -07:00
parent 4db9ad9893
commit b339d63f0d
@@ -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;
}