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:
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_edit.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 8567dd4da13..99eb9a04c0e 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -152,8 +152,11 @@ void OUTLINER_OT_highlight_update(wmOperatorType *ot)
/* Open or close a tree element, optionally toggling all children recursively */
void outliner_item_openclose(TreeElement *te, bool open, bool toggle_all)
{
- TreeStoreElem *tselem = TREESTORE(te);
+ if (BLI_listbase_is_empty(&te->subtree)) {
+ return;
+ }
+ TreeStoreElem *tselem = TREESTORE(te);
if (open) {
tselem->flag &= ~TSE_CLOSED;
}