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>2015-05-04 11:02:56 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-04 11:06:31 +0300
commit74dc4e87a6df2826f26eb94eaff8fe02a3911c24 (patch)
tree464f333495b9836e71631629c863bbc8afc4374f /source/blender/editors/space_buttons
parentc9e5e81064d4ce4863d113ea5dc3773500f01d7d (diff)
Fix Buttons context, invalid object data access
Another instance of T44376. Crash where the Python context would access a stale pointer to the active object.
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index b00a2c54ff9..bc42f1dd5bb 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -1183,6 +1183,11 @@ ID *buttons_context_id_path(const bContext *C)
void ED_buttons_id_unref(SpaceButs *sbuts, const ID *id)
{
+ if (sbuts->pinid == id) {
+ sbuts->pinid = NULL;
+ sbuts->flag &= ~SB_PIN_CONTEXT;
+ }
+
if (sbuts->path) {
ButsContextPath *path = sbuts->path;
int i;