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:
parent
796ffb3671
commit
3105134548
@ -1467,7 +1467,7 @@ wxMacCoreGraphicsContext::wxMacCoreGraphicsContext( wxGraphicsRenderer* renderer
|
||||
SetNativeContext(cgcontext);
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
m_initTransform = CGContextGetCTM(m_cgContext);
|
||||
m_initTransform = m_cgContext ? CGContextGetCTM(m_cgContext) : CGAffineTransformIdentity;
|
||||
}
|
||||
|
||||
wxMacCoreGraphicsContext::wxMacCoreGraphicsContext( wxGraphicsRenderer* renderer, wxWindow* window ): wxGraphicsContext(renderer)
|
||||
|
Loading…
Reference in New Issue
Block a user