Fix bug #1482809 (Pcbnew crashes when opening if it was closed in OpenGL mode)

This commit is contained in:
jean-pierre charras 2015-08-08 14:44:39 +02:00
parent 6018bb6625
commit 9d3a24a87c
2 changed files with 6 additions and 2 deletions

View File

@ -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 )
{

View File

@ -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;
}