diff options
author | Campbell Barton <campbell@blender.org> | 2022-01-07 07:13:31 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-01-07 07:15:08 +0300 |
commit | b3dc1a17a0e7b7e38a8ece70ca0d353aff82c154 (patch) | |
tree | 2eec6693f681341e9b9235ed639489aa3d217eb3 /source/blender/blenkernel/intern/image.c | |
parent | 2cd8238ce3394aa3cf89c4d8c17c71757dd61a08 (diff) |
Fix BKE_image_ensure_tile_token being called with a full path
Assert that only the file name component is passed in
since special handling for UDIM should only be applied to the file name.
Also remove an unnecessary NULL check on the filename argument.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 2d4366846aa..4899c3671aa 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -4062,9 +4062,8 @@ bool BKE_image_fill_tile(struct Image *ima, void BKE_image_ensure_tile_token(char *filename) { - if (filename == NULL) { - return; - } + BLI_assert_msg(BLI_path_slash_find(filename) == NULL, + "Only the file-name component should be used!"); /* Is there a '<' character in the filename? Assume tokens already present. */ if (strstr(filename, "<") != NULL) { |