From eafcf918a0a20b0a6763a826de8cf821961e75a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20S=C3=B6derquist?= Date: Mon, 7 Jun 2010 18:20:47 +0200 Subject: [PATCH] Only touch ctx->priv if vp8_mmap_alloc succeeded. --- vp8/vp8_dx_iface.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vp8/vp8_dx_iface.c b/vp8/vp8_dx_iface.c index e0e1103f0..36a0b39ef 100644 --- a/vp8/vp8_dx_iface.c +++ b/vp8/vp8_dx_iface.c @@ -223,11 +223,12 @@ static vpx_codec_err_t vp8_init(vpx_codec_ctx_t *ctx) res = vp8_mmap_alloc(&mmap); if (!res) + { vp8_init_ctx(ctx, &mmap); - ctx->priv->alg_priv->defer_alloc = 1; - /*post processing level initialized to do nothing */ - + ctx->priv->alg_priv->defer_alloc = 1; + /*post processing level initialized to do nothing */ + } } return res; -- GitLab