Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-06-17 08:53:35 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-06-17 08:53:35 +0300
commit5b833de521f26c6f4af2e852ccf420f3661fb02a (patch)
tree8ff848ff532d8655fc4e9921d920a7007cb877a6 /source/blender/imbuf/intern/readimage.c
parentc03dcc5421e2115ad48d0d407dd57a50a30793a1 (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/readimage.c')
-rw-r--r--source/blender/imbuf/intern/readimage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/readimage.c b/source/blender/imbuf/intern/readimage.c
index 3cf123fbc28..38d54e64035 100644
--- a/source/blender/imbuf/intern/readimage.c
+++ b/source/blender/imbuf/intern/readimage.c
@@ -209,6 +209,8 @@ ImBuf *IMB_loadiffname(const char *filepath, int flags, char colorspace[IM_MAX_S
int file, a;
char filepath_tx[IB_FILENAME_SIZE];
+ BLI_assert(!BLI_path_is_rel(filepath));
+
imb_cache_filename(filepath_tx, filepath, flags);
file = BLI_open(filepath_tx, O_BINARY | O_RDONLY, 0);
@@ -237,6 +239,8 @@ ImBuf *IMB_testiffname(const char *filepath, int flags)
char filepath_tx[IB_FILENAME_SIZE];
char colorspace[IM_MAX_SPACE] = "\0";
+ BLI_assert(!BLI_path_is_rel(filepath));
+
imb_cache_filename(filepath_tx, filepath, flags);
file = BLI_open(filepath_tx, O_BINARY | O_RDONLY, 0);