From 7f03dc28545e0ef61a9ccbbce005504bacde541b Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 10 Jul 2003 08:21:49 +0000 Subject: [PATCH 1/1] Applied patch [ 762033 ] wxTextValidator crashes when given a NULL wxString git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/valtext.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/valtext.cpp b/src/common/valtext.cpp index 530772a890..90627aa28d 100644 --- a/src/common/valtext.cpp +++ b/src/common/valtext.cpp @@ -206,6 +206,9 @@ bool wxTextValidator::TransferToWindow(void) if( !CheckValidator() ) return FALSE; + if (!m_stringValue) + return TRUE; + wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ; control->SetValue(* m_stringValue) ; @@ -218,6 +221,9 @@ bool wxTextValidator::TransferFromWindow(void) if( !CheckValidator() ) return FALSE; + if (!m_stringValue) + return TRUE; + wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ; * m_stringValue = control->GetValue() ; -- 2.45.2