fix missing cleanup and null checks for various singletons
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user