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/editors/space_outliner/outliner_edit.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/editors/space_outliner/outliner_edit.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 681f7fab18a..7fe66b017a4 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -466,7 +466,7 @@ static void id_delete(bContext *C, ReportList *reports, TreeElement *te, TreeSto
BKE_reportf(reports, RPT_WARNING, "Cannot delete indirectly linked id '%s'", id->name);
return;
}
- if (BKE_library_ID_is_indirectly_used(bmain, id) && ID_REAL_USERS(id) <= 1) {
+ if (ID_REAL_USERS(id) <= 1 && BKE_library_ID_is_indirectly_used(bmain, id)) {
BKE_reportf(reports,
RPT_WARNING,
"Cannot delete id '%s', indirectly used data-blocks need at least one user",