summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-08-29 13:23:58 -0700
committerEric Anholt <eric@anholt.net>2009-08-29 13:29:38 -0700
commit3c1172f06636ff4aec24a6c68df937844da73a53 (patch)
tree0906df7ceb3bdfe63cd56bcfdc7af4f9ddaa1d29 /src/mesa/drivers
parent09549704c6579aae2506891d4e9d1c258eab95db (diff)
i965: Fix segfault with ARB_oq CheckQuery when results are already fetched.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_queryobj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c
index f94aa9d022..a195bc32b0 100644
--- a/src/mesa/drivers/dri/i965/brw_queryobj.c
+++ b/src/mesa/drivers/dri/i965/brw_queryobj.c
@@ -148,7 +148,7 @@ static void brw_check_query(GLcontext *ctx, struct gl_query_object *q)
{
struct brw_query_object *query = (struct brw_query_object *)q;
- if (!drm_intel_bo_busy(query->bo)) {
+ if (query->bo == NULL || !drm_intel_bo_busy(query->bo)) {
brw_queryobj_get_results(query);
query->Base.Ready = GL_TRUE;
}