Added a check that canvas exists before trying to dereference it

This commit is contained in:
Ben Ellis 2020-08-06 15:37:21 -04:00
parent 8de6aa161f
commit c3e9007e20
1 changed files with 1 additions and 1 deletions

View File

@ -417,7 +417,7 @@ void EDA_DRAW_FRAME::OnMove( wxMoveEvent& aEvent )
double oldFactor = m_galDisplayOptions.m_scaleFactor;
m_galDisplayOptions.UpdateScaleFactor();
if( oldFactor != m_galDisplayOptions.m_scaleFactor )
if( oldFactor != m_galDisplayOptions.m_scaleFactor && m_canvas )
{
wxSize clientSize = GetClientSize();
GetCanvas()->GetGAL()->ResizeScreen( clientSize.x, clientSize.y );