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>2017-06-29 05:04:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-29 05:19:22 +0300
commit15079b0b439ac814600d33cca88c37a8df259f00 (patch)
tree0f8a5a3166524a7907b9e1db85e0fd3800d62a61 /source/blender/editors/space_outliner
parente14fd191054c699722195c7e2b7c635bf837f411 (diff)
Fix crash & performance regression w/ base lookup
Was doing O(n^2) list lookups with blender-render drawing & transform. Also missing NULL checks would crash. Use Object.base_flag (already used by new draw manager in places) to avoid list lookup. Note, transform still performs inefficient lookups, but only for selected parents (like 2.7x), not all parents.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 9bdc6cb59f3..459af31b921 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -917,8 +917,11 @@ static void outliner_item_activate(
for (gob = gr->gobject.first; gob; gob = gob->next) {
Base *base = BKE_scene_layer_base_find(sl, gob->ob);
- if ((base->flag & BASE_SELECTED) == 0) {
- ED_object_base_select(base, BA_SELECT);
+ /* Object may not be in this scene */
+ if (base != NULL) {
+ if ((base->flag & BASE_SELECTED) == 0) {
+ ED_object_base_select(base, BA_SELECT);
+ }
}
}
}