diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-14 18:28:13 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-05-14 19:00:06 +0300 |
commit | eefd68013cb8b4c9e69bf76d9f7ad3d8bd68e065 (patch) | |
tree | 828bec403291b1a3013188aa80c6c2ac3aec3de0 /source/blender/editors/space_info/info_ops.c | |
parent | 0ab7e78b85cdb08813f645ea98d028047c289492 (diff) |
Cleanup: isolate image dirty flag access in functions
Diffstat (limited to 'source/blender/editors/space_info/info_ops.c')
-rw-r--r-- | source/blender/editors/space_info/info_ops.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 171d8505222..bf43e493cc5 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -160,19 +160,11 @@ static int pack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(ev { Main *bmain = CTX_data_main(C); Image *ima; - ImBuf *ibuf; // first check for dirty images for (ima = bmain->images.first; ima; ima = ima->id.next) { - if (BKE_image_has_loaded_ibuf(ima)) { /* XXX FIX */ - ibuf = BKE_image_acquire_ibuf(ima, NULL, NULL); - - if (ibuf && (ibuf->userflags & IB_BITMAPDIRTY)) { - BKE_image_release_ibuf(ima, ibuf, NULL); - break; - } - - BKE_image_release_ibuf(ima, ibuf, NULL); + if (BKE_image_is_dirty(ima)) { + break; } } |