guarding against setting of NULL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -61,15 +61,17 @@ void wxGCDC::SetGraphicsContext( wxGraphicsContext* ctx )
|
||||
{
|
||||
delete m_graphicContext;
|
||||
m_graphicContext = ctx;
|
||||
m_matrixOriginal = m_graphicContext->GetTransform();
|
||||
if ( m_graphicContext )
|
||||
{
|
||||
m_matrixOriginal = m_graphicContext->GetTransform();
|
||||
m_ok = true;
|
||||
}
|
||||
}
|
||||
|
||||
wxGCDC::wxGCDC(const wxWindowDC& dc)
|
||||
{
|
||||
Init();
|
||||
m_graphicContext = wxGraphicsContext::Create(dc);
|
||||
m_matrixOriginal = m_graphicContext->GetTransform();
|
||||
m_ok = true;
|
||||
SetGraphicsContext( wxGraphicsContext::Create(dc) );
|
||||
if ( dc.GetFont().Ok())
|
||||
m_graphicContext->SetFont( m_graphicContext->CreateFont(dc.GetFont(),dc.GetTextForeground()));
|
||||
if ( dc.GetPen().Ok())
|
||||
|
Reference in New Issue
Block a user