]> git.saurik.com Git - wxWidgets.git/commitdiff
wxNullBrush should not be Ok(), and GetNSColor() should return clearColor.
authorDavid Elliott <dfe@tgwbd.org>
Wed, 9 Jul 2003 18:34:42 +0000 (18:34 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Wed, 9 Jul 2003 18:34:42 +0000 (18:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/cocoa/brush.mm

index 753c947cea5a40372dd70e12e10c1eed8d6324a3..3735acb41b75243b7949763c3d8c87e4ed72cfa8 100644 (file)
@@ -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();
 }