From: Marek Olšák Date: Thu, 5 Feb 2015 17:13:20 +0000 (+0100) Subject: gallium/postprocessing: fix crash at context destruction X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0271ac72d192c0cc092a3f6f47dab88923be1bdb;p=mesa.git gallium/postprocessing: fix crash at context destruction Reviewed-by: Michel Dänzer --- 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); }