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/util.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/util.c')
-rw-r--r-- | source/blender/imbuf/intern/util.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 77962d43470..8b16e03aed2 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -190,7 +190,9 @@ int IMB_ispic_type(const char *name) BLI_stat_t st; int fp; - if (UTIL_DEBUG) printf("IMB_ispic_name: loading %s\n", name); + BLI_assert(!BLI_path_is_rel(name)); + + if (UTIL_DEBUG) printf("%s: loading %s\n", __func__, name); if (BLI_stat(name, &st) == -1) return false; @@ -389,7 +391,9 @@ int imb_get_anim_type(const char *name) int type; BLI_stat_t st; - if (UTIL_DEBUG) printf("in getanimtype: %s\n", name); + BLI_assert(!BLI_path_is_rel(name)); + + if (UTIL_DEBUG) printf("%s: %s\n", __func__, name); #ifndef _WIN32 # ifdef WITH_QUICKTIME @@ -434,7 +438,7 @@ int imb_get_anim_type(const char *name) bool IMB_isanim(const char *filename) { int type; - + type = imb_get_anim_type(filename); return (type && type != ANIM_SEQUENCE); |