7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 22:11:20 +00:00

Fix exception due to decrementing end() on a list of size 0

This commit is contained in:
Mark Roszko 2024-12-24 15:24:26 -05:00
parent 61dac76224
commit 01fb6c80ed

View File

@ -67,7 +67,7 @@ void SCH_NAVIGATE_TOOL::CleanHistory()
entry = m_navHistory.erase( entry );
}
}
if( m_navHistory.size() == 1 )
if( m_navHistory.size() <= 1 )
m_navIndex = m_navHistory.begin();
else
m_navIndex = --m_navHistory.end();