From: Eric Anholt Date: Sat, 29 Aug 2009 20:23:58 +0000 (-0700) Subject: i965: Fix segfault with ARB_oq CheckQuery when results are already fetched. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c1172f06636ff4aec24a6c68df937844da73a53;p=mesa.git i965: Fix segfault with ARB_oq CheckQuery when results are already fetched. --- diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c index f94aa9d0221..a195bc32b07 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; }