diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-05-04 08:07:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-05-04 09:01:20 +0300 |
commit | 77e6a001a96b7eb3b2b1c2216a48c85c1b6906e0 (patch) | |
tree | ff2d44f3d8c661445e5d358f11e9043beadb23f0 /source/blender/blenkernel/intern/scene.c | |
parent | 8d5e57748a777a76dbbe85d432d7d8364775713a (diff) |
Fix T44376: Buttons context, invalid data access
Removing a scene from the buttons window would crash from a Python operator.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r-- | source/blender/blenkernel/intern/scene.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 5b34504184a..c24649556fc 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -82,6 +82,7 @@ #include "BKE_paint.h" #include "BKE_rigidbody.h" #include "BKE_scene.h" +#include "BKE_screen.h" #include "BKE_sequencer.h" #include "BKE_sound.h" #include "BKE_unit.h" @@ -823,6 +824,8 @@ static void scene_unlink_space_buts(SpaceButs *sbuts, Scene *sce) if (sbuts->pinid == &sce->id) { sbuts->pinid = NULL; } + + BKE_spacedata_id_unref((SpaceLink *)sbuts, &sce->id); } void BKE_scene_unlink(Main *bmain, Scene *sce, Scene *newsce) |