From d1f2dc804ca658f28f6537e6af6cf2a93e8c0a08 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Mon, 10 Jun 2002 17:58:08 +0000 Subject: [PATCH] Check for attributes before copying them git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/listctrl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.45.2