From 9de537be98387a8e6ceb0f21b8f7fdcb381530b0 Mon Sep 17 00:00:00 2001 From: "Tim.Ebbeke" Date: Wed, 10 Jan 2024 12:22:02 +0100 Subject: [PATCH] Fixed segfault in linux custom scheme handler. --- nui/src/nui/backend/window_impl_linux.ipp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/nui/src/nui/backend/window_impl_linux.ipp b/nui/src/nui/backend/window_impl_linux.ipp index e7d7413..10af6bd 100644 --- a/nui/src/nui/backend/window_impl_linux.ipp +++ b/nui/src/nui/backend/window_impl_linux.ipp @@ -1,7 +1,10 @@ #include "gobject.hpp" +<<<<<<< HEAD #include +======= +>>>>>>> dfe851c (Fixed segfault on linux with large custom scheme data.) namespace Nui::Impl::Linux { struct AsyncResponse @@ -9,12 +12,15 @@ namespace Nui::Impl::Linux GObjectReference stream; GObjectReference response; std::string data; +<<<<<<< HEAD ~AsyncResponse() { std::cout << "AsyncResponse dtor" << std::endl; if (stream) g_input_stream_close(stream.get(), nullptr, nullptr); } +======= +>>>>>>> dfe851c (Fixed segfault on linux with large custom scheme data.) }; struct SchemeContext @@ -194,6 +200,7 @@ extern "C" { void uriSchemeDestroyNotify(void* userData) { +<<<<<<< HEAD auto* schemeContext = static_cast(userData); auto impl = schemeContext->impl.lock(); if (!impl) @@ -201,6 +208,9 @@ extern "C" { std::lock_guard asyncResponsesGuard{schemeContext->asyncResponsesGuard}; schemeContext->asyncResponses.clear(); +======= + // Useless, because called when everything is already destroyed +>>>>>>> dfe851c (Fixed segfault on linux with large custom scheme data.) } }