]> git.saurik.com Git - wxWidgets.git/commitdiff
Test m_dc before using it
authorRobin Dunn <robin@alldunn.com>
Wed, 7 Apr 2010 20:29:08 +0000 (20:29 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 7 Apr 2010 20:29:08 +0000 (20:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/dcbufcmn.cpp

index 1d339f8ba0592833c42c46df54a83b732bd47645..23055c2187b11ba3e11077cbbaef3b3196ead4ab 100644 (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);
 }