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>2021-03-28 10:39:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-28 10:48:57 +0300
commit3944560b4a3a8c08a51c955977e3be3ae07a1afa (patch)
tree0331dc9a1bf16f1c3ff34428943f6caf4934c916 /source/blender/blenkernel/intern/brush.c
parent0a6bca1f75398aa9acbeae8bd596550cd2ee23e6 (diff)
Cleanup: re-order expensive checks for indirect ID use
Check for indirect ID use after other simple user count checks are made. Also assert ED_object_base_free_and_unlink_no_indirect_check object argument isn't indirectly used.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r--source/blender/blenkernel/intern/brush.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index 13ba1957a32..ef567044282 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -574,8 +574,8 @@ bool BKE_brush_delete(Main *bmain, Brush *brush)
if (brush->id.tag & LIB_TAG_INDIRECT) {
return false;
}
- if (BKE_library_ID_is_indirectly_used(bmain, brush) && ID_REAL_USERS(brush) <= 1 &&
- ID_EXTRA_USERS(brush) == 0) {
+ if (ID_REAL_USERS(brush) <= 1 && ID_EXTRA_USERS(brush) == 0 &&
+ BKE_library_ID_is_indirectly_used(bmain, brush)) {
return false;
}