mirror of https://github.com/WerWolv/ImHex.git
fix: Crashes when opening diffing view
This commit is contained in:
parent
8d3530a4f3
commit
b64bb3bec9
|
@ -262,7 +262,7 @@ namespace hex::ui {
|
||||||
m_tooltipCallback = callback;
|
m_tooltipCallback = callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] i64 getScrollPosition() const {
|
[[nodiscard]] i64 getScrollPosition() {
|
||||||
return m_scrollPosition.get();
|
return m_scrollPosition.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -311,7 +311,7 @@ namespace hex::ui {
|
||||||
{
|
{
|
||||||
const auto window = ImGui::GetCurrentWindowRead();
|
const auto window = ImGui::GetCurrentWindowRead();
|
||||||
const auto axis = ImGuiAxis_Y;
|
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 outerRect = window->Rect();
|
||||||
const auto innerRect = window->InnerRect;
|
const auto innerRect = window->InnerRect;
|
||||||
|
|
Loading…
Reference in New Issue