]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dc.cpp
got rid of wxWindow::m_lDlgCode - now wxWANTS_CHARS style should work for all windows...
[wxWidgets.git] / src / msw / dc.cpp
index f4aeebe02b04bc93e42b8494708019cc977e86dd..bfc738c185ff28c84610f0071570cd2474cb6792 100644 (file)
@@ -137,7 +137,8 @@ private:
 
 wxColourChanger::wxColourChanger(wxDC& dc) : m_dc(dc)
 {
-    if ( dc.GetBrush().GetStyle() == wxSTIPPLE_MASK_OPAQUE )
+    const wxBrush& brush = dc.GetBrush();
+    if ( brush.Ok() && brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE )
     {
         HDC hdc = GetHdcOf(dc);
         m_colFgOld = ::GetTextColor(hdc);