diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index ec701a7a47..a42d91da23 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -1838,6 +1838,12 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, const wxMemoryDC& #endif #endif +#ifdef __WXX11__ + cairo_t* cr = static_cast(dc.GetImpl()->GetCairoContext()); + if ( cr ) + Init(cairo_reference(cr)); +#endif + #ifdef __WXMAC__ CGContextRef cgcontext = (CGContextRef)dc.GetWindow()->MacGetCGContextRef(); cairo_surface_t* surface = cairo_quartz_surface_create_for_cg_context(cgcontext, width, height);