diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-01-11 04:32:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-01-11 04:32:29 +0300 |
commit | 961ac8eb85a6ede92c0d1bd062d2bdf264bbaef5 (patch) | |
tree | a7c28997d99792827db4004058ee6c5608a1b265 /source/blender/imbuf/intern | |
parent | f28d3955e9c848c32e340ec6696142ef124562d5 (diff) |
Report errno string when writing files fails
Screenshot ignored errors, some render code printed 'Saved' without checking for failure.
note: errno is now cleared from IMB_saveiff so all callers don't need to.
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r-- | source/blender/imbuf/intern/writeimage.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c index 28710fba823..84ec2534e7f 100644 --- a/source/blender/imbuf/intern/writeimage.c +++ b/source/blender/imbuf/intern/writeimage.c @@ -34,6 +34,7 @@ #include <stdio.h> #include <stdlib.h> +#include <errno.h> #include "BLI_utildefines.h" #include "BLI_path_util.h" @@ -54,6 +55,8 @@ short IMB_saveiff(struct ImBuf *ibuf, const char *name, int flags) { const ImFileType *type; + errno = 0; + BLI_assert(!BLI_path_is_rel(name)); if (ibuf == NULL) return (false); |