From 2d8da317c18007bc40e74e7b16b9a5414e988a22 Mon Sep 17 00:00:00 2001 From: Artur Wieczorek Date: Tue, 17 Feb 2015 20:52:59 +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. This is the backport of r78484. See #16855. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@78515 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 9eecd92f15..df2d70e9e9 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -588,6 +588,7 @@ All (GUI): wxGenericFileDialog which was accidentally lost some time ago (Carl Godkin). - Fix handling of fast consecutive clicks in wxRibbonBar (atobi). - Fix updating nested window scrollbars in some cases (sbrowne). +- Fix wxPGChoices copy ctor (Snoits). wxGTK: diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 36356ddd63..a23d1ddf12 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -847,6 +847,10 @@ public: m_data = a.m_data; m_data->IncRef(); } + else + { + Init(); + } } /**