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
This commit is contained in:
parent
3bb63e5c80
commit
7f03dc2854
@ -206,6 +206,9 @@ bool wxTextValidator::TransferToWindow(void)
|
|||||||
if( !CheckValidator() )
|
if( !CheckValidator() )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (!m_stringValue)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
|
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
|
||||||
control->SetValue(* m_stringValue) ;
|
control->SetValue(* m_stringValue) ;
|
||||||
|
|
||||||
@ -218,6 +221,9 @@ bool wxTextValidator::TransferFromWindow(void)
|
|||||||
if( !CheckValidator() )
|
if( !CheckValidator() )
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
if (!m_stringValue)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
|
wxTextCtrl *control = (wxTextCtrl *) m_validatorWindow ;
|
||||||
* m_stringValue = control->GetValue() ;
|
* m_stringValue = control->GetValue() ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user