1
0
mirror of synced 2025-01-10 21:41:53 +01:00

fix: Crash when using hex editor when provider == nullptr

This commit is contained in:
WerWolv 2024-12-31 21:30:05 +01:00
parent 268b495a29
commit 493d66d991

View File

@ -534,7 +534,10 @@ namespace hex::ui {
ImGui::TableSetupScrollFreeze(0, 2);
// Row address column
ImGui::TableSetupColumn("hex.ui.common.address"_lang, ImGuiTableColumnFlags_WidthFixed, CharacterSize.x * fmt::formatted_size("{:08X}: ", (m_scrollPosition + m_visibleRowCount) * m_bytesPerRow + m_provider->getBaseAddress() + m_provider->getCurrentPageAddress()));
ImGui::TableSetupColumn("hex.ui.common.address"_lang, ImGuiTableColumnFlags_WidthFixed,
m_provider == nullptr ? 0 :
CharacterSize.x * fmt::formatted_size("{:08X}: ", (m_scrollPosition + m_visibleRowCount) * m_bytesPerRow + m_provider->getBaseAddress() + m_provider->getCurrentPageAddress())
);
ImGui::TableSetupColumn("");
// Byte columns