]> git.saurik.com Git - wxWidgets.git/commitdiff
Check for attributes before copying them
authorMattia Barbon <mbarbon@cpan.org>
Mon, 10 Jun 2002 17:58:08 +0000 (17:58 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Mon, 10 Jun 2002 17:58:08 +0000 (17:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/listctrl.h

index 484670d111fb95466c3711597c38cc10883ebc2a..1907ff19fd809a3cd7524c647e4d423f3277ac59 100644 (file)
@@ -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; }