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
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;
}