Test m_dc before using it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2010-04-07 20:29:08 +00:00
parent 81533a3af6
commit 455bec652a

View File

@@ -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);
}