diff --git a/include/wx/listctrl.h b/include/wx/listctrl.h index 484670d111..1907ff19fd 100644 --- a/include/wx/listctrl.h +++ b/include/wx/listctrl.h @@ -204,7 +204,8 @@ public: m_attr(NULL) { // copy list item attributes - m_attr = new wxListItemAttr(*item.GetAttributes()); + if( item.HasAttributes() ) + m_attr = new wxListItemAttr(*item.GetAttributes()); } virtual ~wxListItem() { delete m_attr; }