message: Fix crash in multi-display handling
diff: @@ -446,11 +446,18 @@ void RestoreWindowState(wxTopLevelWindow *win, const wxSize& defaultSize, int fl
  #endif // __WXMSW__/__WXOSX__
  // If the window is larger than current screen, resize it to fit:
  - int display = wxDisplay::GetFromWindow(win);
  - if ( display == wxNOT_FOUND )
  +#if wxCHECK_VERSION(3,1,0)
  + wxDisplay display(win);
  +#else
  + int display_num = wxDisplay::GetFromWindow(win);
  + if (display_num == wxNOT_FOUND)
  + return;
  + wxDisplay display(display_num);
  +#endif
  + if (!display.IsOk())
  return;
  - wxRect screenRect = wxDisplay(display).GetClientArea();
  + wxRect screenRect = display.GetClientArea();
  wxRect winRect = win->GetRect();
  if ( winRect.GetPosition() == wxDefaultPosition )
  