From dd9b6643e6e535765f8b464c4c35d557bdd64e44 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Wed, 12 Oct 2022 14:50:09 +0200 Subject: [PATCH] fix: Crash when loading a provider after evaluating patterns --- plugins/builtin/source/content/views/view_pattern_data.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/builtin/source/content/views/view_pattern_data.cpp b/plugins/builtin/source/content/views/view_pattern_data.cpp index 9b041a77e..251269c61 100644 --- a/plugins/builtin/source/content/views/view_pattern_data.cpp +++ b/plugins/builtin/source/content/views/view_pattern_data.cpp @@ -15,6 +15,10 @@ namespace hex::plugin::builtin { this->m_sortedPatterns[ImHexApi::Provider::get()].clear(); }); + + EventManager::subscribe([this](auto *provider) { + this->m_sortedPatterns[provider].clear(); + }); } ViewPatternData::~ViewPatternData() {