From b702ad41905ebdfc442ee7a2971e2b2d613cd4f4 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 19 Jan 2023 16:59:34 +0100 Subject: [PATCH] fix: Occasional crash when loading a provider --- plugins/builtin/source/content/views/view_pattern_editor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/builtin/source/content/views/view_pattern_editor.cpp b/plugins/builtin/source/content/views/view_pattern_editor.cpp index d736077e4..de832dbc6 100644 --- a/plugins/builtin/source/content/views/view_pattern_editor.cpp +++ b/plugins/builtin/source/content/views/view_pattern_editor.cpp @@ -765,7 +765,8 @@ namespace hex::plugin::builtin { } std::scoped_lock lock(data.runtimeMutex); - auto &runtime = data.runtime; + auto runtime = std::make_unique(); + ContentRegistry::PatternLanguage::configureRuntime(*runtime, provider); auto mimeType = magic::getMIMEType(provider);