diff options
author | Keith Whitwell <[email protected]> | 2010-11-02 12:05:46 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2010-11-02 16:48:10 +0000 |
commit | debcb434891756573ed2dc102ad1b673a8dce7da (patch) | |
tree | 5286bfab01244685ccc503d4d91662701967c0ff /src/gallium/drivers/llvmpipe | |
parent | 98445b43071414a6bd82d0618002611c6ad70257 (diff) |
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.
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_rast.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index d358a983943..decf3bd4499 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -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; + } } |