Merge pull request #32989 from nekomatata/fix-crash-rename-state
Fixed crashes when renaming a state in AnimationNodeStateMachineEditor
This commit is contained in:
commit
aafd5dd5c1
2 changed files with 4 additions and 3 deletions
|
@ -2221,9 +2221,11 @@ void Control::_modal_stack_remove() {
|
|||
if (!data.MI)
|
||||
return;
|
||||
|
||||
get_viewport()->_gui_remove_from_modal_stack(data.MI, data.modal_prev_focus_owner);
|
||||
|
||||
List<Control *>::Element *element = data.MI;
|
||||
data.MI = NULL;
|
||||
|
||||
get_viewport()->_gui_remove_from_modal_stack(element, data.modal_prev_focus_owner);
|
||||
|
||||
data.modal_prev_focus_owner = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -2374,7 +2374,6 @@ void Viewport::_gui_remove_from_modal_stack(List<Control *>::Element *MI, Object
|
|||
List<Control *>::Element *next = MI->next();
|
||||
|
||||
gui.modal_stack.erase(MI);
|
||||
MI = NULL;
|
||||
|
||||
if (p_prev_focus_owner) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue