diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 935c81d2e1..5cfd6f7118 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -729,10 +729,10 @@ public: // Simple interface constructor. wxPGChoices( wxPGChoicesData* data ) + : m_data(data) { wxCHECK_RET(data, "Data pointer cannot be null"); - m_data = data; - data->IncRef(); + m_data->IncRef(); } // Destructor. diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 0b434cb536..b7ba31714e 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -564,6 +564,7 @@ public: wxPGComboBox() : wxOwnerDrawnComboBox() , m_dclickProcessor(nullptr) + , m_selProp(nullptr) { }