From: David Elliott Date: Wed, 9 Jul 2003 18:34:42 +0000 (+0000) Subject: wxNullBrush should not be Ok(), and GetNSColor() should return clearColor. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1a94b3d8619d8dc146c4073c0a78d15e44b4e8db wxNullBrush should not be Ok(), and GetNSColor() should return clearColor. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/cocoa/brush.mm b/src/cocoa/brush.mm index 753c947cea..3735acb41b 100644 --- a/src/cocoa/brush.mm +++ b/src/cocoa/brush.mm @@ -139,7 +139,6 @@ WX_NSColor wxBrushRefData::GetNSColor() // Brushes wxBrush::wxBrush() { - m_refData = new wxBrushRefData; } wxBrush::~wxBrush() @@ -210,7 +209,8 @@ wxBitmap *wxBrush::GetStipple() const WX_NSColor wxBrush::GetNSColor() { - wxCHECK_MSG( Ok(), NULL, _T("invalid brush") ); + if(!m_refData) + return [NSColor clearColor]; return M_BRUSHDATA->GetNSColor(); }