summaryrefslogtreecommitdiff
path: root/core/input
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-13 21:51:20 +0200
committerGitHub <noreply@github.com>2021-09-13 21:51:20 +0200
commit70ba36674351f9d585cf8ab80a2faa390b52da71 (patch)
treebcb87f26248ad8209406954c7fadf4ee9a4d92a5 /core/input
parentf6022d2aa8973517858bbc673f300ba2ed08884c (diff)
parentce064348fa8ffeff0527133a7c86e018193ab29c (diff)
Merge pull request #50375 from Paulb23/code_edit_unit_tests
Diffstat (limited to 'core/input')
-rw-r--r--core/input/input_map.cpp4
-rw-r--r--core/input/input_map.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp
index fe4ee99204..816d9d1082 100644
--- a/core/input/input_map.cpp
+++ b/core/input/input_map.cpp
@@ -746,3 +746,7 @@ InputMap::InputMap() {
ERR_FAIL_COND_MSG(singleton, "Singleton in InputMap already exist.");
singleton = this;
}
+
+InputMap::~InputMap() {
+ singleton = nullptr;
+}
diff --git a/core/input/input_map.h b/core/input/input_map.h
index a2d3952f94..c724fdb142 100644
--- a/core/input/input_map.h
+++ b/core/input/input_map.h
@@ -95,6 +95,7 @@ public:
const OrderedHashMap<String, List<Ref<InputEvent>>> &get_builtins();
InputMap();
+ ~InputMap();
};
#endif // INPUT_MAP_H