]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dcmemory.cpp
don't refresh the current cell in SetCellHighlightROPenWidth() if it's invalid (...
[wxWidgets.git] / src / msw / dcmemory.cpp
index 1ad90bbb837e0b5da9dea832b1484548d0bcbb82..6869e6f4e4b2f6873ede578fd7c176a7f0ad394e 100644 (file)
@@ -80,9 +80,9 @@ void wxMemoryDCImpl::Init()
 
 bool wxMemoryDCImpl::CreateCompatible(wxDC *dc)
 {
-    wxDCImpl *impl = dc->GetImpl();
+    wxDCImpl *impl = dc ? dc->GetImpl() : NULL ;
     wxMSWDCImpl *msw_impl = wxDynamicCast( impl, wxMSWDCImpl );
-    if (!msw_impl)
+    if ( dc && !msw_impl)
     {
         m_ok = false;
         return false;