From c6d98fa8418d16f124a2866adf8a5848734241fd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 22 Oct 2015 16:48:38 +1100 Subject: 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. --- source/blender/avi/intern/avi.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/avi/intern/avi.c') 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); -- cgit v1.2.3