mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-30 13:26:58 +00:00
FIX: wxMediaCtrl3 zero size crash
Change-Id: I16a3f7b3afe142bb957a1740b8e8c9820c92b349 Jira: STUDIO-8522 (cherry picked from commit 8cdaea1162ccbcc0bd03ecd99346f3b9cf52cf64)
This commit is contained in:
@@ -122,6 +122,8 @@ void wxMediaCtrl3::paintEvent(wxPaintEvent &evt)
|
|||||||
{
|
{
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
auto size = GetSize();
|
auto size = GetSize();
|
||||||
|
if (size.x <= 0 || size.y <= 0)
|
||||||
|
return;
|
||||||
std::unique_lock<std::mutex> lk(m_mutex);
|
std::unique_lock<std::mutex> lk(m_mutex);
|
||||||
if (!m_frame.IsOk())
|
if (!m_frame.IsOk())
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user