diff options
Diffstat (limited to 'video/mp_image.c')
-rw-r--r-- | video/mp_image.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/video/mp_image.c b/video/mp_image.c index cf17429d89..269db4b2b0 100644 --- a/video/mp_image.c +++ b/video/mp_image.c @@ -252,6 +252,9 @@ void mp_image_steal_data(struct mp_image *dst, struct mp_image *src) // while img is left untouched. struct mp_image *mp_image_new_ref(struct mp_image *img) { + if (!img) + return NULL; + if (!img->refcount) return mp_image_new_copy(img); |