X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/196fc5f2883badc4c5bcf33a52185e6d7531d853..0bbe61b8c18a1795189f0cf73cc61c14a0fb846d:/src/msw/dcmemory.cpp diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp index 1ad90bbb83..6869e6f4e4 100644 --- a/src/msw/dcmemory.cpp +++ b/src/msw/dcmemory.cpp @@ -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;