summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_sub.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter/vf_sub.c')
-rw-r--r--video/filter/vf_sub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/filter/vf_sub.c b/video/filter/vf_sub.c
index 1f31d7b67f..e2d633dce7 100644
--- a/video/filter/vf_sub.c
+++ b/video/filter/vf_sub.c
@@ -96,6 +96,8 @@ static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi)
if (vf->priv->opt_top_margin || vf->priv->opt_bottom_margin) {
struct mp_image *dmpi = vf_alloc_out_image(vf);
+ if (!dmpi)
+ return NULL;
mp_image_copy_attributes(dmpi, mpi);
prepare_image(vf, dmpi, mpi);
talloc_free(mpi);