From 0aae39efd27d0325a84c363e2cf350a72bd59d5c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 4 Jul 2011 21:09:24 +0000 Subject: [PATCH] Fix crash when getting or setting wxComboBox value in wxUniv. Forward DoGetValue() and SetValue() to the associated wxTextCtrl. Closes #13298. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/combobox.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 95df6afad4..0cfcbcdd71 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -273,12 +273,13 @@ wxComboBox::~wxComboBox() wxString wxComboBox::DoGetValue() const { - return wxComboCtrl::GetValue(); + return GetTextCtrl() ? GetTextCtrl()->GetValue() : wxString(); } void wxComboBox::SetValue(const wxString& value) { - wxComboCtrl::SetValue(value); + if ( GetTextCtrl() ) + GetTextCtrl()->SetValue(value); } void wxComboBox::WriteText(const wxString& value) -- 2.50.0