X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/93c5dd39af2fb5eb12c5c837999be944543b21b0..57dde4bd5860cda4666326b611f535dfc28139f2:/src/gtk1/colour.cpp?ds=inline diff --git a/src/gtk1/colour.cpp b/src/gtk1/colour.cpp index 9c9eef687d..51fde80c11 100644 --- a/src/gtk1/colour.cpp +++ b/src/gtk1/colour.cpp @@ -118,7 +118,18 @@ wxColour& wxColour::operator = ( const wxColour& col ) bool wxColour::operator == ( const wxColour& col ) const { - return m_refData == col.m_refData; + if (m_refData == col.m_refData) return TRUE; + + if (!m_refData) return FALSE; + if (!col.m_refData) return FALSE; + + GdkColor *own = &(((wxColourRefData*)m_refData)->m_color); + GdkColor *other = &(((wxColourRefData*)col.m_refData)->m_color); + if (own->red != other->red) return FALSE; + if (own->blue != other->blue) return FALSE; + if (own->green != other->green) return FALSE; + + return TRUE; } bool wxColour::operator != ( const wxColour& col) const