summaryrefslogtreecommitdiffstats
path: root/video/mp_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/mp_image.c')
-rw-r--r--video/mp_image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/video/mp_image.c b/video/mp_image.c
index 0ca59c62c9..5adce213e5 100644
--- a/video/mp_image.c
+++ b/video/mp_image.c
@@ -230,7 +230,7 @@ struct mp_image *mp_image_new_dummy_ref(struct mp_image *img)
{
struct mp_image *new = talloc_ptrtype(NULL, new);
talloc_set_destructor(new, mp_image_destructor);
- *new = *img;
+ *new = img ? *img : (struct mp_image){0};
for (int p = 0; p < MP_MAX_PLANES; p++)
new->bufs[p] = NULL;
new->hwctx = NULL;