1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

fix missing cleanup and null checks for various singletons

This commit is contained in:
rune-scape
2024-06-18 00:30:20 -07:00
parent 8c70c18132
commit 6adcb1373a
6 changed files with 18 additions and 4 deletions

View File

@@ -299,6 +299,7 @@ RendererCompositorRD::RendererCompositorRD() {
}
}
ERR_FAIL_COND_MSG(singleton != nullptr, "A RendererCompositorRD singleton already exists.");
singleton = this;
utilities = memnew(RendererRD::Utilities);
@@ -330,6 +331,7 @@ RendererCompositorRD::RendererCompositorRD() {
}
RendererCompositorRD::~RendererCompositorRD() {
singleton = nullptr;
memdelete(uniform_set_cache);
memdelete(framebuffer_cache);
ShaderRD::set_shader_cache_dir(String());