Don't dereference ctx->priv if it hasn't been setup correctly.
authorFredrik Söderquist <fs@opera.com>
Mon, 7 Jun 2010 16:24:41 +0000 (18:24 +0200)
committerJohn Koleszar <jkoleszar@google.com>
Fri, 23 Jul 2010 23:13:50 +0000 (19:13 -0400)
vp8/vp8_dx_iface.c

index 36a0b39..7e4fc0b 100644 (file)
@@ -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++)
         {