]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/brush.cpp
don't crash in UnselectAll() if the tree has no root
[wxWidgets.git] / src / mac / carbon / brush.cpp
index 36703d2cc70343537d8755f084eef1aece56a8e7..5c872567630ed9a7c354afe94ca99a302ea0ee61 100644 (file)
@@ -65,8 +65,13 @@ wxBrush::wxBrush(const wxBitmap& stipple)
 {
     m_refData = new wxBrushRefData;
 
-    M_BRUSHDATA->m_style = wxSTIPPLE;
+    M_BRUSHDATA->m_colour = *wxBLACK;
     M_BRUSHDATA->m_stipple = stipple;
+    
+    if (M_BRUSHDATA->m_stipple.GetMask())
+        M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
+    else
+        M_BRUSHDATA->m_style = wxSTIPPLE;
 
     RealizeResource();
 }