summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-02-05 18:13:20 +0100
committerMarek Olšák <[email protected]>2015-02-06 20:03:06 +0100
commit0271ac72d192c0cc092a3f6f47dab88923be1bdb (patch)
tree08fdb7e1daf420571ac81ce0b2fc005e03e3a264 /src/gallium
parent2fd21c4098f4574f896d7baeec6a8e5f3b7783ab (diff)
gallium/postprocessing: fix crash at context destruction
Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/dri/dri_context.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c
index 84b88073c0e..8ac81b7364b 100644
--- a/src/gallium/state_trackers/dri/dri_context.c
+++ b/src/gallium/state_trackers/dri/dri_context.c
@@ -165,6 +165,9 @@ dri_destroy_context(__DRIcontext * cPriv)
hud_destroy(ctx->hud);
}
+ if (ctx->pp)
+ pp_free(ctx->pp);
+
/* No particular reason to wait for command completion before
* destroying a context, but we flush the context here
* to avoid having to add code elsewhere to cope with flushing a
@@ -172,10 +175,6 @@ dri_destroy_context(__DRIcontext * cPriv)
*/
ctx->st->flush(ctx->st, 0, NULL);
ctx->st->destroy(ctx->st);
-
- if (ctx->pp)
- pp_free(ctx->pp);
-
free(ctx);
}