diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index 37de178537..aa81261ab6 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -499,6 +499,11 @@ public: } virtual ~wxCairoImageContext() + { + Flush(); + } + + virtual void Flush() { m_image = m_data.ConvertToImage(); } diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index f27b66ff43..c02c65d4c2 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -459,6 +459,11 @@ public: } virtual ~wxGDIPlusImageContext() + { + Flush(); + } + + virtual void Flush() { m_image = m_bitmap.ConvertToImage(); }