mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
fix missing cleanup and null checks for various singletons
This commit is contained in:
parent
8c70c18132
commit
6adcb1373a
6 changed files with 18 additions and 4 deletions
|
@ -47,6 +47,7 @@ bool RendererCompositor::is_xr_enabled() const {
|
|||
}
|
||||
|
||||
RendererCompositor::RendererCompositor() {
|
||||
ERR_FAIL_COND_MSG(singleton != nullptr, "A RendererCompositor singleton already exists.");
|
||||
singleton = this;
|
||||
|
||||
#ifndef _3D_DISABLED
|
||||
|
@ -57,3 +58,7 @@ RendererCompositor::RendererCompositor() {
|
|||
}
|
||||
#endif // _3D_DISABLED
|
||||
}
|
||||
|
||||
RendererCompositor::~RendererCompositor() {
|
||||
singleton = nullptr;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue