diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-06-17 08:53:35 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-06-17 08:53:35 +0300 |
commit | 5b833de521f26c6f4af2e852ccf420f3661fb02a (patch) | |
tree | 8ff848ff532d8655fc4e9921d920a7007cb877a6 /source/blender/imbuf/intern/writeimage.c | |
parent | c03dcc5421e2115ad48d0d407dd57a50a30793a1 (diff) |
ImBuf: Assert when read/write gets relative paths
We _never_ want this, so better not fail silently.
Diffstat (limited to 'source/blender/imbuf/intern/writeimage.c')
-rw-r--r-- | source/blender/imbuf/intern/writeimage.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c index 2f688803804..28710fba823 100644 --- a/source/blender/imbuf/intern/writeimage.c +++ b/source/blender/imbuf/intern/writeimage.c @@ -33,6 +33,10 @@ #include <stdio.h> +#include <stdlib.h> + +#include "BLI_utildefines.h" +#include "BLI_path_util.h" #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" @@ -50,6 +54,8 @@ short IMB_saveiff(struct ImBuf *ibuf, const char *name, int flags) { const ImFileType *type; + BLI_assert(!BLI_path_is_rel(name)); + if (ibuf == NULL) return (false); ibuf->flags = flags; |