fix: Crash when setting selection in a hex editor instance without provider

This commit is contained in:
WerWolv 2024-05-17 22:43:35 +02:00
parent 94bc279bd8
commit b54f46de30
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ namespace hex::ui {
}
void setSelection(const Region &region) { this->setSelection(region.getStartAddress(), region.getEndAddress()); }
void setSelection(u128 start, u128 end) {
if (!ImHexApi::Provider::isValid())
if (!ImHexApi::Provider::isValid() || m_provider == nullptr)
return;
if (start > m_provider->getBaseAddress() + m_provider->getActualSize())