diff options
Diffstat (limited to 'source/blender/avi')
-rw-r--r-- | source/blender/avi/intern/avi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c index 6ea94d3b2f3..9601d6e5002 100644 --- a/source/blender/avi/intern/avi.c +++ b/source/blender/avi/intern/avi.c @@ -1063,6 +1063,11 @@ AviError AVI_close_compress(AviMovie *movie) { int temp, movi_size, i; + if (movie->fp == NULL) { + /* none of the allocations below were done if the file failed to open */ + return AVI_ERROR_FOUND; + } + fseek(movie->fp, 0L, SEEK_END); movi_size = (int)ftell(movie->fp); |