fix: Crash when loading a provider after evaluating patterns

This commit is contained in:
WerWolv 2022-10-12 14:50:09 +02:00
parent e3f88395ec
commit dd9b6643e6
1 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,10 @@ namespace hex::plugin::builtin {
this->m_sortedPatterns[ImHexApi::Provider::get()].clear(); this->m_sortedPatterns[ImHexApi::Provider::get()].clear();
}); });
EventManager::subscribe<EventProviderClosed>([this](auto *provider) {
this->m_sortedPatterns[provider].clear();
});
} }
ViewPatternData::~ViewPatternData() { ViewPatternData::~ViewPatternData() {