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:
Keith Whitwell 2010-11-02 12:05:46 +00:00
parent 98445b4307
commit debcb43489
1 changed files with 5 additions and 2 deletions

View File

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