diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-05-04 11:02:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-05-04 11:06:31 +0300 |
commit | 74dc4e87a6df2826f26eb94eaff8fe02a3911c24 (patch) | |
tree | 464f333495b9836e71631629c863bbc8afc4374f /source/blender/editors/space_buttons | |
parent | c9e5e81064d4ce4863d113ea5dc3773500f01d7d (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.c | 5 |
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; |