summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-01 00:58:39 +0100
committerwm4 <wm4@nowhere>2012-11-01 02:12:18 +0100
commitc59a80b77c16d832cf529c80f88e148f4ad3c038 (patch)
tree9ed31c6f30459484177f6c92c59896a5b307453e
parent1809cbcc90db65826f5fc8a84ae4804382937828 (diff)
downloadmpv-c59a80b77c16d832cf529c80f88e148f4ad3c038.tar.bz2
mpv-c59a80b77c16d832cf529c80f88e148f4ad3c038.tar.xz
vf: fix NULL pointer issue
"mpi" was accessed right after the if block, that checked that mpi is not NULL. Either the check is uneeded, or the access to "mpi" always crashes. Just move the access inside the checked block.
-rw-r--r--libmpcodecs/vf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c
index 3bb06446c3..b9937e578c 100644
--- a/libmpcodecs/vf.c
+++ b/libmpcodecs/vf.c
@@ -358,8 +358,8 @@ mp_image_t *vf_get_image(vf_instance_t *vf, unsigned int outfmt,
mpi->flags |= MP_IMGFLAG_TYPE_DISPLAYED;
}
mpi->qscale = NULL;
+ mpi->usage_count++;
}
- mpi->usage_count++;
return mpi;
}