fix crash with lots of operators when running "blender -d". Easy case to reproduce, just try to delete default cube.

Temporary hack to prevent crasher, likely caused by rev. 36242.
This commit is contained in:
Andrea Weikert
2011-04-20 20:46:02 +00:00
parent a6c2d8680b
commit 2d9c94604a

View File

@@ -1538,12 +1538,19 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
}
/* modal ui handler can be tagged to be freed */
/* XXX TODO - handler was free'd in wm_handler_ui_call
and memory could be written to in BLI_remlink.
As temporary solution preventing this by
making sure handler is still in the list.
*/
if(handler->flag & WM_HANDLER_DO_FREE) {
BLI_remlink(handlers, handler);
wm_event_free_handler(handler);
if (BLI_findindex(handlers, handler) >= 0) {
BLI_remlink(handlers, handler);
wm_event_free_handler(handler);
}
}
/* XXX fileread case */
if(CTX_wm_window(C)==NULL)
return action;