From d501e1e5f22b14fbfbf9b2129cf64bf957d4fd33 Mon Sep 17 00:00:00 2001 From: Mark Roszko Date: Tue, 24 Dec 2024 17:50:41 -0500 Subject: [PATCH] Fix another iterator exception (cherry picked from commit a7147bd22ea34c26843dc3a1b731aece9b79e871) --- eeschema/tools/sch_navigate_tool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeschema/tools/sch_navigate_tool.cpp b/eeschema/tools/sch_navigate_tool.cpp index e83ae9956c..be5a37ec5c 100644 --- a/eeschema/tools/sch_navigate_tool.cpp +++ b/eeschema/tools/sch_navigate_tool.cpp @@ -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();