forked from bartvdbraak/blender
Bugfix #24726
Doing F1-load a lot of times on same .blend could crash. Janne karhu provided a potential fix, which is good to add anyway. Will ask him to verify too. Added XXX warning for these lines, after filesel exec no context variables should be re-used. Is for later investigation.
This commit is contained in:
parent
e3ace7ee62
commit
7a7b4aff40
@ -1285,6 +1285,7 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
|
|||||||
|
|
||||||
retval= handler->op->type->exec(C, handler->op);
|
retval= handler->op->type->exec(C, handler->op);
|
||||||
|
|
||||||
|
/* XXX check this carefully, CTX_wm_manager(C) == wm is a bit hackish */
|
||||||
if(handler->op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
|
if(handler->op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm)
|
||||||
wm->op_undo_depth--;
|
wm->op_undo_depth--;
|
||||||
|
|
||||||
@ -1292,7 +1293,8 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
|
|||||||
if(G.f & G_DEBUG)
|
if(G.f & G_DEBUG)
|
||||||
wm_operator_print(handler->op);
|
wm_operator_print(handler->op);
|
||||||
|
|
||||||
if(wm->op_undo_depth == 0)
|
/* XXX check this carefully, CTX_wm_manager(C) == wm is a bit hackish */
|
||||||
|
if(CTX_wm_manager(C) == wm && wm->op_undo_depth == 0)
|
||||||
if(handler->op->type->flag & OPTYPE_UNDO)
|
if(handler->op->type->flag & OPTYPE_UNDO)
|
||||||
ED_undo_push_op(C, handler->op);
|
ED_undo_push_op(C, handler->op);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user