Fixed crash caused by A=B?C:D used for returning wxObject derived type.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -167,9 +167,20 @@ void wxStdRenderer::DrawBackground(wxDC& dc,
|
|||||||
int WXUNUSED(flags),
|
int WXUNUSED(flags),
|
||||||
wxWindow *window)
|
wxWindow *window)
|
||||||
{
|
{
|
||||||
wxColour colBg = col.Ok() ? col
|
wxColour colBg;
|
||||||
: window ? m_scheme->GetBackground(window)
|
|
||||||
: wxSCHEME_COLOUR(m_scheme, CONTROL);
|
if (col.Ok())
|
||||||
|
{
|
||||||
|
colBg = col;
|
||||||
|
}
|
||||||
|
else if (window)
|
||||||
|
{
|
||||||
|
colBg = m_scheme->GetBackground(window);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
colBg = wxSCHEME_COLOUR(m_scheme, CONTROL);
|
||||||
|
}
|
||||||
|
|
||||||
DrawSolidRect(dc, colBg, rect);
|
DrawSolidRect(dc, colBg, rect);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user