From b37d50db1d2fcfa84209d0790b85ea07aff60d26 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Fri, 13 Feb 2015 19:42:07 +0000 Subject: [PATCH] Initialize wxPGChoices object properly in its copy ctor if source object has no data. Internal data must be always initialized whether the source object contains choices data or not. Closes #16855 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78484 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + include/wx/propgrid/property.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 944fa2107e..41018d17fa 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -100,6 +100,7 @@ All (GUI): - Add wxOwnerDrawnComboBox::Is{List,Text}Empty() methods. - Fix creating/removing mode buttons in wxPG manager (Artur Wieczorek). - Harmonize wxMenuEvent handling between all major ports. +- Fix wxPGChoices copy ctor (Snoits). wxGTK: diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 240a387feb..a5e1cbd816 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -858,6 +858,10 @@ public: m_data = a.m_data; m_data->IncRef(); } + else + { + Init(); + } } /**