From c59a80b77c16d832cf529c80f88e148f4ad3c038 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 1 Nov 2012 00:58:39 +0100 Subject: [PATCH] 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. --- libmpcodecs/vf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }