diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 6ab6bcb628..f81e7104a8 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -1428,6 +1428,11 @@ void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp) } #else GdkPixbuf *pixbuf = GetPixbuf(); + + // Pixmap will get out of date when our pixbuf is accessed directly, so + // ensure we don't keep the old data in it. + PurgeOtherRepresentations(Pixbuf); + const bool hasAlpha = HasAlpha(); // allow access if bpp is valid and matches existence of alpha