ImBuf: Assert when read/write gets relative paths

We _never_ want this, so better not fail silently.
This commit is contained in:
2015-06-17 15:53:35 +10:00
parent c03dcc5421
commit 5b833de521
4 changed files with 19 additions and 3 deletions

View File

@@ -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);