From c7479835b07032e53fa92ddc12a0be32109c4f8f Mon Sep 17 00:00:00 2001 From: "Tim.Ebbeke" Date: Tue, 29 Aug 2023 17:01:03 +0200 Subject: [PATCH] Fixed use after free. --- nui/src/nui/backend/window.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/nui/src/nui/backend/window.cpp b/nui/src/nui/backend/window.cpp index 9d25e85..d2d7c46 100644 --- a/nui/src/nui/backend/window.cpp +++ b/nui/src/nui/backend/window.cpp @@ -210,13 +210,7 @@ extern "C" { void uriSchemeDestroyNotify(void* data) { - auto* schemeContext = static_cast(data); - auto impl = schemeContext->impl.lock(); - if (!impl) - return; - - std::lock_guard lock{impl->schemeResponseRegistryGuard}; - impl->schemeResponseRegistry.erase(schemeContext->id); + // Happens when everything else is already dead. } } #endif