diff --git a/Source/Engine/Renderer/GlobalSignDistanceFieldPass.cpp b/Source/Engine/Renderer/GlobalSignDistanceFieldPass.cpp index f53e10511..e13bf3f61 100644 --- a/Source/Engine/Renderer/GlobalSignDistanceFieldPass.cpp +++ b/Source/Engine/Renderer/GlobalSignDistanceFieldPass.cpp @@ -167,6 +167,15 @@ public: HashSet SDFTextures; GlobalSignDistanceFieldPass::BindingData Result; + ~GlobalSignDistanceFieldCustomBuffer() + { + for (const auto& e : SDFTextures) + { + e.Item->Deleted.Unbind(this); + e.Item->ResidentMipsChanged.Unbind(this); + } + } + void OnSDFTextureDeleted(ScriptingObject* object) { auto* texture = (GPUTexture*)object;