From: Robin Dunn Date: Wed, 7 Apr 2010 20:29:08 +0000 (+0000) Subject: Test m_dc before using it X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/455bec652a67f86df6a6d5524ca7fed37ac7a098 Test m_dc before using it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/dcbufcmn.cpp b/src/common/dcbufcmn.cpp index 1d339f8ba0..23055c2187 100644 --- a/src/common/dcbufcmn.cpp +++ b/src/common/dcbufcmn.cpp @@ -118,7 +118,7 @@ void wxBufferedDC::UseBuffer(wxCoord w, wxCoord h) // now that the DC is valid we can inherit the attributes (fonts, colours, // layout direction, ...) from the original DC - if ( m_dc->IsOk() ) + if ( m_dc && m_dc->IsOk() ) CopyAttributes(*m_dc); }