From: Fredrik Söderquist Date: Mon, 7 Jun 2010 16:24:41 +0000 (+0200) Subject: Don't dereference ctx->priv if it hasn't been setup correctly. X-Git-Tag: v0.9.2~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2add72d9bcec97855691b90e62b8f3f1634e3544;p=libvpx Don't dereference ctx->priv if it hasn't been setup correctly. --- diff --git a/vp8/vp8_dx_iface.c b/vp8/vp8_dx_iface.c index 36a0b39ef..7e4fc0be6 100644 --- a/vp8/vp8_dx_iface.c +++ b/vp8/vp8_dx_iface.c @@ -528,7 +528,7 @@ static vpx_codec_err_t vp8_xma_set_mmap(vpx_codec_ctx_t *ctx, done = 1; - if (ctx->priv->alg_priv) + if (!res && ctx->priv->alg_priv) { for (i = 0; i < NELEMENTS(vp8_mem_req_segs); i++) {