Skip to content

Commit

Permalink
fix: Crash when closing providers
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Jun 16, 2024
1 parent b3b79b3 commit bee4b90
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/libimhex/include/hex/api/imhex_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ namespace hex {
namespace impl {

void resetClosingProvider();
const std::set<prv::Provider*>& getClosingProviders();
std::set<prv::Provider*> getClosingProviders();

}

Expand Down
2 changes: 1 addition & 1 deletion lib/libimhex/source/api/imhex_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ namespace hex {
s_closingProviders.clear();
}

const std::set<prv::Provider*>& getClosingProviders() {
std::set<prv::Provider*> getClosingProviders() {
return s_closingProviders;
}

Expand Down
2 changes: 1 addition & 1 deletion plugins/builtin/source/content/ui_items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ namespace hex::plugin::builtin {
auto &tabProvider = providers[i];
const auto selectedProviderIndex = ImHexApi::Provider::getCurrentProviderIndex();

const auto &closingProviders = ImHexApi::Provider::impl::getClosingProviders();
const auto closingProviders = ImHexApi::Provider::impl::getClosingProviders();
if (std::ranges::find(closingProviders, tabProvider) != closingProviders.end())
continue;

Expand Down

0 comments on commit bee4b90

Please sign in to comment.