Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/avi/intern/avi.c')
-rw-r--r--source/blender/avi/intern/avi.c5
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);