diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-12-09 19:30:55 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-12-09 19:36:19 +0300 |
commit | e427e4dbb125dcf4429f5a9a16d007b4dcde5c19 (patch) | |
tree | 8e87bef099509a6533237250e27eded255de2283 /source | |
parent | fc14d02bc59636bf613ec473c65c06c7198d696b (diff) |
Fix T93871: Image.has_data returns True for images that failed to load
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 1c31e1be8bb..1efaa9a8c3d 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -5770,8 +5770,12 @@ bool BKE_image_has_loaded_ibuf(Image *image) struct MovieCacheIter *iter = IMB_moviecacheIter_new(image->cache); while (!IMB_moviecacheIter_done(iter)) { - has_loaded_ibuf = true; - break; + ImBuf *ibuf = IMB_moviecacheIter_getImBuf(iter); + if (ibuf != NULL) { + has_loaded_ibuf = true; + break; + } + IMB_moviecacheIter_step(iter); } IMB_moviecacheIter_free(iter); } |