diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-10-22 08:48:38 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-10-22 09:25:37 +0300 |
commit | c6d98fa8418d16f124a2866adf8a5848734241fd (patch) | |
tree | 912c465d1f2b635fa82a57ee5d4a82fa6a23e8bc /source/blender/avi/intern/avi.c | |
parent | 85072eb4e91851177d7b5cd810f6ef3e033cae12 (diff) |
Fix T46565: Movie render crash w/o permissions
Rendering to a path that didn't have write permissions would crash.
Also fix error where `G.is_rendering` was left set when rendering failed.
Diffstat (limited to 'source/blender/avi/intern/avi.c')
-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); |