Check for attributes before copying them

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon 2002-06-10 17:58:08 +00:00
parent 678ebfcdae
commit d1f2dc804c

View File

@ -204,6 +204,7 @@ public:
m_attr(NULL) m_attr(NULL)
{ {
// copy list item attributes // copy list item attributes
if( item.HasAttributes() )
m_attr = new wxListItemAttr(*item.GetAttributes()); m_attr = new wxListItemAttr(*item.GetAttributes());
} }
virtual ~wxListItem() { delete m_attr; } virtual ~wxListItem() { delete m_attr; }