summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-04-15 12:32:17 -0400
committerRob Clark <[email protected]>2017-04-17 14:00:05 -0400
commitd4601b0efc7f5e24e3f39fefa8e29e79560245ce (patch)
tree1c1fb3e57bba5a49a8abdaf677ee6db37f31c958 /src
parent15fe9b2347931f474d751dde04cc30f91e6c2d26 (diff)
freedreno: fix crash if ctx torn down with no rendering
In this case, ctx->flush_queue would not have been initialized. Fixes: 0b613c20 ("freedreno: enable draw/batch reordering by default") Cc: "17.1" <[email protected]> Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_context.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c
index 4d8c4251a8b..6478e0e7a9c 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.c
+++ b/src/gallium/drivers/freedreno/freedreno_context.c
@@ -112,7 +112,7 @@ fd_context_destroy(struct pipe_context *pctx)
DBG("");
- if (ctx->screen->reorder)
+ if (ctx->screen->reorder && util_queue_is_initialized(&ctx->flush_queue))
util_queue_destroy(&ctx->flush_queue);
fd_batch_reference(&ctx->batch, NULL); /* unref current batch */