diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-26 04:04:46 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-26 04:04:46 +0300 |
commit | ffe13aeb232ac6bad3a98997b4a352f434293193 (patch) | |
tree | d508373c563212b9349b415b55e8407489c2f06d /source | |
parent | 7a19832a78bea88d0a9c64809ef6e6576e870456 (diff) |
the user interface could access invalid RNA on deleting objects since checking the button ran after freeing the data.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index b41f47db271..fa5d60a20f6 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -4100,7 +4100,11 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s data->state= state; - ui_check_but(but); + if(state != BUTTON_STATE_EXIT) { + /* When objects for eg. are removed, running ui_check_but() + * can access the removed data - so disable update on exit */ + ui_check_but(but); + } /* redraw */ ED_region_tag_redraw(data->region); |