1
0
mirror of synced 2025-02-20 04:01:01 +01:00

fix: Diff view crash when closing provider that's being diffed

This commit is contained in:
WerWolv 2022-08-22 11:04:32 +02:00
parent dacb64ae66
commit a6eaa34f6d

View File

@ -34,10 +34,16 @@ namespace hex::plugin::builtin {
this->m_upperCaseHex = static_cast<int>(upperCaseHex);
}
});
EventManager::subscribe<EventProviderClosed>(this, [this](prv::Provider *) {
this->m_providerA = -1;
this->m_providerB = -1;
});
}
ViewDiff::~ViewDiff() {
EventManager::unsubscribe<EventSettingsChanged>(this);
EventManager::unsubscribe<EventProviderClosed>(this);
}
static void drawProviderSelector(int &provider) {