]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/brush.mm
* Use a subclass of NSView for the dummy view which overrides hitTest: to
[wxWidgets.git] / 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();
 }