summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/r300/r300_query.c')
-rw-r--r--src/gallium/drivers/r300/r300_query.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_query.c b/src/gallium/drivers/r300/r300_query.c
index 10cb468dfcc..10086ee9256 100644
--- a/src/gallium/drivers/r300/r300_query.c
+++ b/src/gallium/drivers/r300/r300_query.c
@@ -37,7 +37,9 @@ static struct pipe_query *r300_create_query(struct pipe_context *pipe,
struct r300_screen *r300screen = r300->screen;
struct r300_query *q;
- assert(query_type == PIPE_QUERY_OCCLUSION_COUNTER);
+ if (query_type != PIPE_QUERY_OCCLUSION_COUNTER) {
+ return NULL;
+ }
q = CALLOC_STRUCT(r300_query);
if (!q)