X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b7cacb43db1e69b87b257a67912b4d52995b070a..4fe0156b18e2330be391b804da341e546164b85f:/src/mgl/brush.cpp diff --git a/src/mgl/brush.cpp b/src/mgl/brush.cpp index 9415eea448..cb542c34f8 100644 --- a/src/mgl/brush.cpp +++ b/src/mgl/brush.cpp @@ -76,6 +76,13 @@ public: wxBrushRefData(); wxBrushRefData(const wxBrushRefData& data); + bool operator == (const wxBrushRefData& data) const + { + return (m_style == data.m_style && + m_stipple.IsSameAs(data.m_stipple) && + m_colour == data.m_colour); + } + int m_style; wxColour m_colour; wxBitmap m_stipple; @@ -145,7 +152,11 @@ wxBrush::wxBrush(const wxBitmap &stippleBitmap) bool wxBrush::operator == (const wxBrush& brush) const { - return m_refData == brush.m_refData; + if (m_refData == brush.m_refData) return true; + + if (!m_refData || !brush.m_refData) return false; + + return *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData; } bool wxBrush::operator != (const wxBrush& brush) const