added self-assignment check to wxListItem::operator=()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
83666e9909
commit
17520c84b3
@ -237,6 +237,8 @@ public:
|
||||
}
|
||||
|
||||
wxListItem& operator=(const wxListItem& item)
|
||||
{
|
||||
if ( &item != this )
|
||||
{
|
||||
m_mask = item.m_mask;
|
||||
m_itemId = item.m_itemId;
|
||||
@ -249,6 +251,7 @@ public:
|
||||
m_format = item.m_format;
|
||||
m_width = item.m_width;
|
||||
m_attr = item.m_attr ? new wxListItemAttr(*item.m_attr) : NULL;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user