Don't attempt to get CTM if CGContext is NULL
When wxMacCoreGraphicsContext is constructed with CGContext==NULL, initial transformation matrix can be assumed as an identity matrix.
This commit is contained in:
@@ -1467,7 +1467,7 @@ wxMacCoreGraphicsContext::wxMacCoreGraphicsContext( wxGraphicsRenderer* renderer
|
|||||||
SetNativeContext(cgcontext);
|
SetNativeContext(cgcontext);
|
||||||
m_width = width;
|
m_width = width;
|
||||||
m_height = height;
|
m_height = height;
|
||||||
m_initTransform = CGContextGetCTM(m_cgContext);
|
m_initTransform = m_cgContext ? CGContextGetCTM(m_cgContext) : CGAffineTransformIdentity;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMacCoreGraphicsContext::wxMacCoreGraphicsContext( wxGraphicsRenderer* renderer, wxWindow* window ): wxGraphicsContext(renderer)
|
wxMacCoreGraphicsContext::wxMacCoreGraphicsContext( wxGraphicsRenderer* renderer, wxWindow* window ): wxGraphicsContext(renderer)
|
||||||
|
Reference in New Issue
Block a user