FIX: crash when no WMP

Change-Id: I9bab2e73da05125ee2ca24ac13456fbb82e91714
This commit is contained in:
chunmao.guo 2022-07-26 15:19:28 +08:00 committed by Lane.Wei
parent 13bd9ca445
commit 405444f042
1 changed files with 4 additions and 2 deletions

View File

@ -233,8 +233,10 @@ void wxMediaCtrl2::DoSetSize(int x, int y, int width, int height, int sizeFlags)
BOOST_LOG_TRIVIAL(info) << "wxMediaCtrl2::DoSetSize: width: " << width << ", height: " << height << ", maxHeight: " << maxHeight; BOOST_LOG_TRIVIAL(info) << "wxMediaCtrl2::DoSetSize: width: " << width << ", height: " << height << ", maxHeight: " << maxHeight;
SetMaxSize({-1, maxHeight}); SetMaxSize({-1, maxHeight});
Slic3r::GUI::wxGetApp().CallAfter([this] { Slic3r::GUI::wxGetApp().CallAfter([this] {
GetParent()->Layout(); if (auto p = GetParent()) {
GetParent()->Refresh(); p->Layout();
p->Refresh();
}
}); });
} }
} }