forked from bartvdbraak/blender
Fix T39974: Popups lead to crash if 'UNDO' isn't set
This isn't supported, raise an error instead
This commit is contained in:
parent
0309a7b9a9
commit
4b75956330
@ -1588,6 +1588,14 @@ static int wm_operator_props_popup_ex(bContext *C, wmOperator *op,
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
if (do_redo) {
|
||||
if ((op->type->flag & OPTYPE_UNDO) == 0) {
|
||||
BKE_reportf(op->reports, RPT_ERROR,
|
||||
"Operator '%s' does not have undo enabled, incorrect invoke function", op->type->idname);
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
}
|
||||
|
||||
/* if we don't have global undo, we can't do undo push for automatic redo,
|
||||
* so we require manual OK clicking in this popup */
|
||||
if (!do_redo || !(U.uiflag & USER_GLOBALUNDO))
|
||||
|
Loading…
Reference in New Issue
Block a user