diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp index 3d8e4562e2..75460e5e60 100644 --- a/src/msw/statbox.cpp +++ b/src/msw/statbox.cpp @@ -310,7 +310,8 @@ WXLRESULT wxStaticBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPar void wxStaticBox::OnDPIChanged(wxDPIChangedEvent& WXUNUSED(event)) { - PositionLabelWindow(); + if ( m_labelWin ) + PositionLabelWindow(); } // ----------------------------------------------------------------------------