From 296f80ffe5051944af5cf26bd23a3960e604f932 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 2 Dec 2024 21:16:20 +0100 Subject: [PATCH] fix: Data information sections getting duplicated in NullProvieders --- plugins/builtin/source/content/views/view_information.cpp | 1 + plugins/builtin/source/content/welcome_screen.cpp | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/builtin/source/content/views/view_information.cpp b/plugins/builtin/source/content/views/view_information.cpp index 4f1569871..cae08509b 100644 --- a/plugins/builtin/source/content/views/view_information.cpp +++ b/plugins/builtin/source/content/views/view_information.cpp @@ -18,6 +18,7 @@ namespace hex::plugin::builtin { m_analysisData.setOnCreateCallback([](const prv::Provider *provider, AnalysisData &data) { data.analyzedProvider = provider; + data.informationSections.clear(); for (const auto &informationSectionConstructor : ContentRegistry::DataInformation::impl::getInformationSectionConstructors()) { data.informationSections.push_back(informationSectionConstructor()); } diff --git a/plugins/builtin/source/content/welcome_screen.cpp b/plugins/builtin/source/content/welcome_screen.cpp index d1a5a38b1..cd8ae68cb 100644 --- a/plugins/builtin/source/content/welcome_screen.cpp +++ b/plugins/builtin/source/content/welcome_screen.cpp @@ -364,8 +364,7 @@ namespace hex::plugin::builtin { if (ImGuiExt::DimmedIconButton(ICON_VS_CLOSE, ImGuiExt::GetCustomColorVec4(ImGuiCustomCol_ToolbarRed))) { auto provider = ImHexApi::Provider::createProvider("hex.builtin.provider.null"); if (provider != nullptr) - if (provider->open()) - EventProviderOpened::post(provider); + std::ignore = provider->open(); } }