fix: Crash when opening diff view

#2269
This commit is contained in:
WerWolv
2025-05-26 18:34:00 +02:00
parent ed3e2f65f8
commit f341413248
2 changed files with 5 additions and 2 deletions

View File

@@ -34,14 +34,14 @@ namespace hex::ui {
}
ImS64& get() {
if (m_synced)
if (m_synced || m_provider == nullptr)
return m_syncedPosition;
else
return m_unsyncedPosition.get(m_provider);
}
[[nodiscard]] const ImS64& get() const {
if (m_synced)
if (m_synced || m_provider == nullptr)
return m_syncedPosition;
else
return m_unsyncedPosition.get(m_provider);