the user interface could access invalid RNA on deleting objects since checking the...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 26 Dec 2009 01:04:46 +0000 (01:04 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 26 Dec 2009 01:04:46 +0000 (01:04 +0000)
source/blender/editors/interface/interface_handlers.c

index b41f47db2710b5e2f20057f759e7dc07677d4f5f..fa5d60a20f6f5a24f7ac55ae90fcb9a2221de5d1 100644 (file)
@@ -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);