Added a check that canvas exists before trying to dereference it
This commit is contained in:
parent
8de6aa161f
commit
c3e9007e20
|
@ -417,7 +417,7 @@ void EDA_DRAW_FRAME::OnMove( wxMoveEvent& aEvent )
|
||||||
double oldFactor = m_galDisplayOptions.m_scaleFactor;
|
double oldFactor = m_galDisplayOptions.m_scaleFactor;
|
||||||
m_galDisplayOptions.UpdateScaleFactor();
|
m_galDisplayOptions.UpdateScaleFactor();
|
||||||
|
|
||||||
if( oldFactor != m_galDisplayOptions.m_scaleFactor )
|
if( oldFactor != m_galDisplayOptions.m_scaleFactor && m_canvas )
|
||||||
{
|
{
|
||||||
wxSize clientSize = GetClientSize();
|
wxSize clientSize = GetClientSize();
|
||||||
GetCanvas()->GetGAL()->ResizeScreen( clientSize.x, clientSize.y );
|
GetCanvas()->GetGAL()->ResizeScreen( clientSize.x, clientSize.y );
|
||||||
|
|
Loading…
Reference in New Issue