From 20c192cc2dcd9efa644fd0b0a995adcb4c00c0c4 Mon Sep 17 00:00:00 2001 From: rsjtdrjgfuzkfg Date: Thu, 15 Dec 2022 20:28:20 +0100 Subject: OpenXR: fix casts and loop in action map editor This commit replaces potentially unsafe static casts with Object::cast_to and fixes the order in which UI elements are looped over when removing controls. This fixes crashes and wrong data being displayed in the OpenXR action map editor when saving or resetting action maps. --- modules/openxr/editor/openxr_select_action_dialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/openxr/editor/openxr_select_action_dialog.cpp') diff --git a/modules/openxr/editor/openxr_select_action_dialog.cpp b/modules/openxr/editor/openxr_select_action_dialog.cpp index 5f018291d5..c4b2ef95c5 100644 --- a/modules/openxr/editor/openxr_select_action_dialog.cpp +++ b/modules/openxr/editor/openxr_select_action_dialog.cpp @@ -47,7 +47,7 @@ void OpenXRSelectActionDialog::_notification(int p_what) { void OpenXRSelectActionDialog::_on_select_action(const String p_action) { if (selected_action != "") { NodePath button_path = action_buttons[selected_action]; - Button *button = static_cast