diff --git a/eeschema/symbol_editor/symbol_edit_frame.h b/eeschema/symbol_editor/symbol_edit_frame.h index a4c799e325..71f5a0f44d 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 b4ad4c703d..0e7bace127 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -484,6 +484,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 );