From 455bec652a67f86df6a6d5524ca7fed37ac7a098 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 7 Apr 2010 20:29:08 +0000 Subject: [PATCH] Test m_dc before using it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/dcbufcmn.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.45.2