git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54244
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxGridCellWithAttr& operator=(const wxGridCellWithAttr& other)
{
coords = other.coords;
wxGridCellWithAttr& operator=(const wxGridCellWithAttr& other)
{
coords = other.coords;
- attr->DecRef();
- attr = other.attr;
- attr->IncRef();
-
+ if (attr != other.attr)
+ {
+ attr->DecRef();
+ attr = other.attr;
+ attr->IncRef();
+ }
else
{
size_t n = (size_t)i;
else
{
size_t n = (size_t)i;
+ if ( m_attrs[n] == attr )
+ // nothing to do
+ return;
if ( attr )
{
// change the attribute
if ( attr )
{
// change the attribute