Fix another iterator exception

(cherry picked from commit a7147bd22e)
This commit is contained in:
Mark Roszko
2024-12-24 17:50:41 -05:00
committed by Wayne Stambaugh
parent 99a177e307
commit d501e1e5f2
+1 -1
View File
@@ -288,7 +288,7 @@ void SCH_NAVIGATE_TOOL::pushToHistory( SCH_SHEET_PATH aPath )
if( CanGoForward() )
m_navHistory.erase( std::next( m_navIndex ), m_navHistory.end() );
if( m_navHistory.empty() || ( *m_navHistory.end() != aPath ) )
if( m_navHistory.empty() || ( *(--m_navHistory.end()) != aPath ) )
m_navHistory.push_back( aPath );
m_navIndex = --m_navHistory.end();