1
0
mirror of synced 2024-09-24 11:38:26 +02:00

fix: Crashes when opening diffing view

This commit is contained in:
WerWolv 2023-12-28 19:21:15 +01:00
parent 8d3530a4f3
commit b64bb3bec9
2 changed files with 2 additions and 2 deletions

View File

@ -262,7 +262,7 @@ namespace hex::ui {
m_tooltipCallback = callback;
}
[[nodiscard]] i64 getScrollPosition() const {
[[nodiscard]] i64 getScrollPosition() {
return m_scrollPosition.get();
}

View File

@ -311,7 +311,7 @@ namespace hex::ui {
{
const auto window = ImGui::GetCurrentWindowRead();
const auto axis = ImGuiAxis_Y;
ImS64 numRows = (m_provider->getSize() / m_bytesPerRow) + ((m_provider->getSize() % m_bytesPerRow) == 0 ? 0 : 1);
ImS64 numRows = m_provider == nullptr ? 0 : (m_provider->getSize() / m_bytesPerRow) + ((m_provider->getSize() % m_bytesPerRow) == 0 ? 0 : 1);
const auto outerRect = window->Rect();
const auto innerRect = window->InnerRect;