diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index e4288375fa..db1ef35c27 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -529,7 +529,7 @@ wxPGChoiceEntry& wxPGChoicesData::Insert(int index, wxIMPLEMENT_ABSTRACT_CLASS(wxPGProperty, wxObject); #if WXWIN_COMPATIBILITY_3_2 -wxString* wxPGProperty::sm_wxPG_LABEL = new wxString("@!"); +wxString* wxPGProperty::sm_wxPG_LABEL = nullptr; #endif // WXWIN_COMPATIBILITY_3_2 const wxString wxPGProperty::sm_labelItem("@!"); diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index ecdbe8fe64..77a3156d85 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -204,6 +204,10 @@ wxPGGlobalVarsClass::wxPGGlobalVarsClass() , m_extraStyle(0) , m_warnings(0) { +#if WXWIN_COMPATIBILITY_3_2 + wxPGProperty::sm_wxPG_LABEL = new wxString("@!"); +#endif // WXWIN_COMPATIBILITY_3_2 + /* TRANSLATORS: Name of Boolean false value */ m_boolChoices.Add(_("False")); /* TRANSLATORS: Name of Boolean true value */