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:
authorBastien Montagne <bastien@blender.org>2022-02-17 19:07:25 +0300
committerBastien Montagne <bastien@blender.org>2022-02-17 19:08:00 +0300
commitb5e3700b793f730b404315493ceadb60e4af708d (patch)
tree6d5374dcbe17ef359dd0c05ce90e1202e30322c0 /source/blender/blenkernel/intern/lib_id_delete.c
parentc99d1d5d0db8ac7af0d479341e1bd87ead681387 (diff)
Cleanup: Replace direct `id.lib` pointer checks with `ID_IS_LINKED` macro usages.
Diffstat (limited to 'source/blender/blenkernel/intern/lib_id_delete.c')
-rw-r--r--source/blender/blenkernel/intern/lib_id_delete.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/lib_id_delete.c b/source/blender/blenkernel/intern/lib_id_delete.c
index cf25af1c637..ba5556c8b2d 100644
--- a/source/blender/blenkernel/intern/lib_id_delete.c
+++ b/source/blender/blenkernel/intern/lib_id_delete.c
@@ -234,7 +234,7 @@ static size_t id_delete(Main *bmain, const bool do_tagged_deletion)
for (id = lb->first; id; id = id_next) {
id_next = id->next;
/* NOTE: in case we delete a library, we also delete all its datablocks! */
- if ((id->tag & tag) || (id->lib != NULL && (id->lib->id.tag & tag))) {
+ if ((id->tag & tag) || (ID_IS_LINKED(id) && (id->lib->id.tag & tag))) {
BLI_remlink(lb, id);
BLI_addtail(&tagged_deleted_ids, id);
/* Do not tag as no_main now, we want to unlink it first (lower-level ID management
@@ -290,7 +290,7 @@ static size_t id_delete(Main *bmain, const bool do_tagged_deletion)
for (id = lb->first; id; id = id_next) {
id_next = id->next;
/* NOTE: in case we delete a library, we also delete all its datablocks! */
- if ((id->tag & tag) || (id->lib != NULL && (id->lib->id.tag & tag))) {
+ if ((id->tag & tag) || (ID_IS_LINKED(id) && (id->lib->id.tag & tag))) {
id->tag |= tag;
BKE_id_remapper_add(remapper, id, NULL);
}