diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 02310e9242..4570603ec9 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -510,6 +510,11 @@ public: } virtual ~wxCairoImageContext() + { + Flush(); + } + + virtual void Flush() wxOVERRIDE { m_image = m_data.ConvertToImage(); } diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index f875891d82..e484e0c972 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -451,6 +451,11 @@ public: } virtual ~wxGDIPlusImageContext() + { + Flush(); + } + + virtual void Flush() wxOVERRIDE { m_image = m_bitmap.ConvertToImage(); }