X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a96827606ef54312168c7f48aea419d36c4b2f43..a5655d37db9baabce654849fd66173f95f74e230:/src/common/dcbufcmn.cpp diff --git a/src/common/dcbufcmn.cpp b/src/common/dcbufcmn.cpp index 58d40b5f9b..23055c2187 100644 --- a/src/common/dcbufcmn.cpp +++ b/src/common/dcbufcmn.cpp @@ -118,14 +118,14 @@ 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); } void wxBufferedDC::UnMask() { - wxCHECK_RET( m_dc, _T("no underlying wxDC?") ); - wxASSERT_MSG( m_buffer && m_buffer->IsOk(), _T("invalid backing store") ); + wxCHECK_RET( m_dc, wxT("no underlying wxDC?") ); + wxASSERT_MSG( m_buffer && m_buffer->IsOk(), wxT("invalid backing store") ); wxCoord x = 0, y = 0;