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:
@@ -1538,11 +1538,18 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* modal ui handler can be tagged to be freed */
|
/* 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) {
|
if(handler->flag & WM_HANDLER_DO_FREE) {
|
||||||
|
if (BLI_findindex(handlers, handler) >= 0) {
|
||||||
BLI_remlink(handlers, handler);
|
BLI_remlink(handlers, handler);
|
||||||
wm_event_free_handler(handler);
|
wm_event_free_handler(handler);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* XXX fileread case */
|
/* XXX fileread case */
|
||||||
if(CTX_wm_window(C)==NULL)
|
if(CTX_wm_window(C)==NULL)
|
||||||
|
Reference in New Issue
Block a user