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() ;