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 <montagne29@wanadoo.fr>2014-04-17 12:48:32 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-04-17 12:48:32 +0400
commit88ae0be1c41bde777577cd9b08c6b963fbca7e0c (patch)
treefddb07d9350c905af52770b450f42a3044bc5b76
parentbd3231c7604a346bbbb6adeb1d027077392eabe2 (diff)
Fix T39758: Blender Crash when removing pinned Scene.
-rw-r--r--source/blender/blenkernel/intern/scene.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index a81f9c4ae2b..7854395a162 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -743,6 +743,13 @@ static void scene_unlink_space_node(SpaceNode *snode, Scene *sce)
}
}
+static void scene_unlink_space_buts(SpaceButs *sbuts, Scene *sce)
+{
+ if (sbuts->pinid == &sce->id) {
+ sbuts->pinid = NULL;
+ }
+}
+
void BKE_scene_unlink(Main *bmain, Scene *sce, Scene *newsce)
{
Scene *sce1;
@@ -775,8 +782,12 @@ void BKE_scene_unlink(Main *bmain, Scene *sce, Scene *newsce)
for (area = screen->areabase.first; area; area = area->next) {
SpaceLink *space_link;
for (space_link = area->spacedata.first; space_link; space_link = space_link->next) {
- if (space_link->spacetype == SPACE_NODE)
- scene_unlink_space_node((SpaceNode *)space_link, sce);
+ switch (space_link->spacetype) {
+ case SPACE_NODE:
+ scene_unlink_space_node((SpaceNode *)space_link, sce);
+ case SPACE_BUTS:
+ scene_unlink_space_buts((SpaceButs *)space_link, sce);
+ }
}
}
}