summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/project_settings_editor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 49687a504f..1f65589643 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -182,8 +182,8 @@ void ProjectSettingsEditor::_device_input_add() {
Ref<InputEvent> ie;
String name = add_at;
int idx = edit_idx;
- Variant old_val = ProjectSettings::get_singleton()->get(name);
- Array arr = old_val;
+ Array old_val = ProjectSettings::get_singleton()->get(name);
+ Array arr = old_val.duplicate();
switch (add_type) {
@@ -285,8 +285,8 @@ void ProjectSettingsEditor::_press_a_key_confirm() {
String name = add_at;
int idx = edit_idx;
- Variant old_val = ProjectSettings::get_singleton()->get(name);
- Array arr = old_val;
+ Array old_val = ProjectSettings::get_singleton()->get(name);
+ Array arr = old_val.duplicate();
for (int i = 0; i < arr.size(); i++) {