diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c index 1ba723a957..afb66fa85a 100644 --- a/libavcodec/imgconvert.c +++ b/libavcodec/imgconvert.c @@ -576,6 +576,8 @@ static void img_copy_plane(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height) { + if((!dst) || (!src)) + return; for(;height > 0; height--) { memcpy(dst, src, width); dst += dst_wrap;