diff --git a/docs/changes.txt b/docs/changes.txt index ac8a75c52c..230b970c86 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -591,6 +591,7 @@ All (GUI): - Fix updating nested window scrollbars in some cases (sbrowne). - Fix wxPGChoices copy ctor (Snoits). - Fix wxPixelData::Offset() for alpha (Markus Rollmann). +- Fix bug in wxImage::ClearAlpha() for shared data (Markus Rollmann). wxGTK: diff --git a/src/common/image.cpp b/src/common/image.cpp index b800e58ad8..2120296c56 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -2040,6 +2040,8 @@ void wxImage::ClearAlpha() { wxCHECK_RET( HasAlpha(), wxT("image already doesn't have an alpha channel") ); + AllocExclusive(); + if ( !M_IMGDATA->m_staticAlpha ) free( M_IMGDATA->m_alpha );