fix: Pattern source code being deleted when closing a provider
This commit is contained in:
parent
ca57f91bfa
commit
eade95dff7
@ -111,7 +111,7 @@ namespace hex {
|
||||
s_providers.erase(it);
|
||||
|
||||
if (it - s_providers.begin() == s_currentProvider)
|
||||
s_currentProvider = 0;
|
||||
setCurrentProvider(0);
|
||||
|
||||
delete provider;
|
||||
}
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include <imgui.h>
|
||||
#include <hex/ui/imgui_imhex_extensions.h>
|
||||
#include <hex/ui/imgui_data_visualizers.hpp>
|
||||
|
||||
namespace hex::plugin::builtin {
|
||||
|
||||
|
@ -145,8 +145,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
});
|
||||
|
||||
EventManager::subscribe<EventFileUnloaded>(this, [this] {
|
||||
this->m_textEditor.SetText("");
|
||||
EventManager::subscribe<EventFileUnloaded>(this, [] {
|
||||
ImHexApi::Provider::get()->getPatternLanguageRuntime().abort();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user