FIX: wxMediaCtrl3 zero size crash

Change-Id: I16a3f7b3afe142bb957a1740b8e8c9820c92b349
Jira: STUDIO-8522
This commit is contained in:
chunmao.guo 2024-10-25 09:27:32 +08:00 committed by Lane.Wei
parent 13ca5a05d8
commit 8cdaea1162
1 changed files with 2 additions and 0 deletions

View File

@ -122,6 +122,8 @@ void wxMediaCtrl3::paintEvent(wxPaintEvent &evt)
{
wxPaintDC dc(this);
auto size = GetSize();
if (size.x <= 0 || size.y <= 0)
return;
std::unique_lock<std::mutex> lk(m_mutex);
if (!m_frame.IsOk())
return;