FIX: StaticBox zero size bitmap

Change-Id: I33d942f771171fe1f2a61b5f3d1a66a6c7e0da05
This commit is contained in:
chunmao.guo 2022-12-13 16:40:50 +08:00 committed by Lane.Wei
parent 99b97ffeb4
commit 1d04c35d0d
1 changed files with 2 additions and 0 deletions

View File

@ -141,6 +141,8 @@ void StaticBox::render(wxDC& dc)
} }
wxSize size = GetSize(); wxSize size = GetSize();
if (size.x <= 0 || size.y <= 0)
return;
wxMemoryDC memdc; wxMemoryDC memdc;
wxBitmap bmp(size.x, size.y); wxBitmap bmp(size.x, size.y);
memdc.SelectObject(bmp); memdc.SelectObject(bmp);