avoid calling GetHeight() on non-IsOk() icons

probably fixes #3837
This commit is contained in:
dakkar 2020-04-06 12:48:33 +01:00 committed by lukasmatena
parent 1238b40f14
commit 34b504d50e

View File

@ -1710,10 +1710,11 @@ bool BitmapChoiceRenderer::Render(wxRect rect, wxDC* dc, int state)
{
dc->DrawBitmap(icon, rect.x, rect.y + (rect.height - icon.GetHeight()) / 2);
xoffset = icon.GetWidth() + 4;
if (rect.height==0)
rect.height= icon.GetHeight();
}
if (rect.height==0)
rect.height= icon.GetHeight();
RenderText(m_value.GetText(), xoffset, rect, dc, state);
return true;