llvmpipe: guard against NULL task->query pointer
This doesn't seem like it should be possible, but some test suites manage to hit this case. Avoid crashing release builds under those circumstances.
This commit is contained in:
@@ -485,8 +485,11 @@ static void
|
||||
lp_rast_end_query(struct lp_rasterizer_task *task,
|
||||
const union lp_rast_cmd_arg arg)
|
||||
{
|
||||
task->query->count[task->thread_index] += task->vis_counter;
|
||||
task->query = NULL;
|
||||
assert(task->query);
|
||||
if (task->query) {
|
||||
task->query->count[task->thread_index] += task->vis_counter;
|
||||
task->query = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user