Eeschema: Fix a crash at start in Debug mode

This commit is contained in:
jean-pierre charras 2018-09-10 11:16:59 +02:00 committed by Jeff Young
parent f9faa6ea16
commit 58916a200e
1 changed files with 7 additions and 4 deletions

View File

@ -222,8 +222,12 @@ void EDA_DRAW_PANEL_GAL::onSize( wxSizeEvent& aEvent )
{ {
wxSize clientSize = GetClientSize(); wxSize clientSize = GetClientSize();
m_gal->ResizeScreen( clientSize.x, clientSize.y ); m_gal->ResizeScreen( clientSize.x, clientSize.y );
m_view->MarkTargetDirty( KIGFX::TARGET_CACHED );
m_view->MarkTargetDirty( KIGFX::TARGET_NONCACHED ); if( m_view )
{
m_view->MarkTargetDirty( KIGFX::TARGET_CACHED );
m_view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
}
} }
@ -480,7 +484,7 @@ void EDA_DRAW_PANEL_GAL::SetCurrentCursor( int aCursor )
{ {
m_currentCursor = wxCURSOR_ARROW; m_currentCursor = wxCURSOR_ARROW;
} }
SetCursor( (wxStockCursor) m_currentCursor ); SetCursor( (wxStockCursor) m_currentCursor );
} }
@ -488,4 +492,3 @@ void EDA_DRAW_PANEL_GAL::SetDefaultCursor()
{ {
SetCurrentCursor( m_defaultCursor ); SetCurrentCursor( m_defaultCursor );
} }