FIX: wxDisplay crash on wxNOT_FOUND

Change-Id: If7b936d361873e20fb71b7fc35c9d270cd39a763
This commit is contained in:
chunmao.guo 2022-08-12 13:11:03 +08:00 committed by Lane.Wei
parent d4ddd8f470
commit af54a34567
5 changed files with 8 additions and 8 deletions

View file

@ -2911,7 +2911,7 @@ ObjectTableDialog::ObjectTableDialog(wxWindow* parent, Plater* platerObj, Model
wxSize panel_size = m_obj_panel->get_init_size();
g_max_size_from_parent = maxSize;
if ((maxSize.GetWidth() == -1) || (maxSize.GetHeight() == -1)) {
wxDisplay display(wxDisplay::GetFromWindow(this));
wxDisplay display(this);
//auto drect = display.GetGeometry();
wxRect client_area = display.GetClientArea ();
g_max_size_from_parent.SetWidth(client_area.GetWidth());