From: Mattia Barbon Date: Mon, 10 Jun 2002 17:58:08 +0000 (+0000) Subject: Check for attributes before copying them X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d1f2dc804ca658f28f6537e6af6cf2a93e8c0a08 Check for attributes before copying them git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- 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; }