]> git.saurik.com Git - wxWidgets.git/commitdiff
adaptions for latest dc changes
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 30 Nov 2007 16:52:04 +0000 (16:52 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 30 Nov 2007 16:52:04 +0000 (16:52 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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;