Fix InputMap and display server not nulling singleton on free
This commit is contained in:
parent
55a20129d6
commit
d186862338
|
@ -746,3 +746,7 @@ InputMap::InputMap() {
|
|||
ERR_FAIL_COND_MSG(singleton, "Singleton in InputMap already exist.");
|
||||
singleton = this;
|
||||
}
|
||||
|
||||
InputMap::~InputMap() {
|
||||
singleton = nullptr;
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ public:
|
|||
const OrderedHashMap<String, List<Ref<InputEvent>>> &get_builtins();
|
||||
|
||||
InputMap();
|
||||
~InputMap();
|
||||
};
|
||||
|
||||
#endif // INPUT_MAP_H
|
||||
|
|
|
@ -605,4 +605,5 @@ DisplayServer::DisplayServer() {
|
|||
}
|
||||
|
||||
DisplayServer::~DisplayServer() {
|
||||
singleton = nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue