Fixed creating wxGraphicsContext from Cairo context.

Reference count of the source Cairo context should be increased to prevent source context from being destroyed in wxGraphicsContex dtor (where cairo_destroy is invoked).
This commit is contained in:
Artur Wieczorek 2016-04-16 21:34:08 +02:00
parent 495a88ba73
commit ca7670d2fc

View File

@ -2089,7 +2089,7 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, cairo_t *context )
m_mswSurface = NULL;
m_mswStateSavedDC = 0;
#endif // __WXMSW__
Init( context );
Init( cairo_reference(context) );
m_width = 0;
m_height = 0;
// Store transformation settings of the underlying source context.