diff --git a/common/basicframe.cpp b/common/basicframe.cpp index ae97d5c53b..5276d7f49b 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -164,7 +164,8 @@ bool EDA_BASE_FRAME::ProcessEvent( wxEvent& aEvent ) if( !wxFrame::ProcessEvent( aEvent ) ) return false; - if( m_hasAutoSave && (m_autoSaveState != isAutoSaveRequired()) && (m_autoSaveInterval > 0) ) + if( IsShown() && m_hasAutoSave && + (m_autoSaveState != isAutoSaveRequired()) && (m_autoSaveInterval > 0) ) { if( !m_autoSaveState ) { diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index e61efc9fda..903faed85f 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -534,7 +534,10 @@ void PCB_EDIT_FRAME::SetPageSettings( const PAGE_INFO& aPageSettings ) bool PCB_EDIT_FRAME::isAutoSaveRequired() const { - return GetScreen()->IsSave(); + if( GetScreen() ) + return GetScreen()->IsSave(); + + return false; }