From: Vadim Zeitlin Date: Sun, 9 Oct 2011 22:07:10 +0000 (+0000) Subject: Fixed non-existent wxCairoContext default ctor. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/793132080692efd8ddd90f3e88d292d07256a0a2?ds=inline Fixed non-existent wxCairoContext default ctor. wxCairoContext class declared default ctor which wasn't implemented and even couldn't be implemented because its base class didn't have any default ctor neither. Fix this by providing a ctor taking wxGraphicsRenderer* and implement it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 92893cac39..9635a86bfe 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -354,7 +354,10 @@ public: #endif wxCairoContext( wxGraphicsRenderer* renderer, cairo_t *context ); wxCairoContext( wxGraphicsRenderer* renderer, wxWindow *window); - wxCairoContext(); + + // If this ctor is used, Init() must be called by the derived class later. + wxCairoContext( wxGraphicsRenderer* renderer ); + virtual ~wxCairoContext(); virtual bool ShouldOffset() const @@ -1660,6 +1663,12 @@ wxCairoContext::wxCairoContext( wxGraphicsRenderer* renderer, wxWindow *window) } +wxCairoContext::wxCairoContext(wxGraphicsRenderer* renderer) : + wxGraphicsContext(renderer) +{ + m_context = NULL; +} + wxCairoContext::~wxCairoContext() { if ( m_context )