projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98445b4
)
llvmpipe: guard against NULL task->query pointer
author
Keith Whitwell
<keithw@vmware.com>
Tue, 2 Nov 2010 12:05:46 +0000
(12:05 +0000)
committer
Keith Whitwell
<keithw@vmware.com>
Tue, 2 Nov 2010 16:48:10 +0000
(16:48 +0000)
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.
src/gallium/drivers/llvmpipe/lp_rast.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/llvmpipe/lp_rast.c
b/src/gallium/drivers/llvmpipe/lp_rast.c
index d358a983943080170e3d34bbe76b142375aa4cdd..decf3bd44991bc46dd3ed45d7c3a4af40e5ec1c2 100644
(file)
--- 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;
+ }
}