diff --git a/eeschema/symbol_editor/symbol_edit_frame.h b/eeschema/symbol_editor/symbol_edit_frame.h index 216bbeb499..b363f26a21 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.h +++ b/eeschema/symbol_editor/symbol_edit_frame.h @@ -247,7 +247,14 @@ public: UpdateSymbolMsgPanelInfo(); } - bool IsSymbolFromSchematic() const { return m_isSymbolFromSchematic; } + bool IsSymbolFromSchematic() const + { + // If we've already vetted closing this window, then we have no symbol anymore + if( m_isClosing ) + return false; + + return m_isSymbolFromSchematic; + } bool IsSymbolFromLegacyLibrary() const; diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index b5c1a0851f..97fa4e93db 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -494,6 +494,10 @@ void FOOTPRINT_EDIT_FRAME::ClearModify() bool FOOTPRINT_EDIT_FRAME::IsCurrentFPFromBoard() const { + // If we've already vetted closing this window, then we have no FP anymore + if( m_isClosing ) + return false; + FOOTPRINT* footprint = GetBoard()->GetFirstFootprint(); return ( footprint && footprint->GetLink() != niluuid );