diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 6e677a242f..6088249d86 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -469,7 +469,8 @@ void wxPGTextCtrlEditor::DrawValue( wxDC& dc, wxPGProperty* property, const wxRe void wxPGTextCtrlEditor::UpdateControl( wxPGProperty* property, wxWindow* ctrl ) const { - wxTextCtrl* tc = wxStaticCast(ctrl, wxTextCtrl); + wxTextCtrl* tc = wxDynamicCast(ctrl, wxTextCtrl); + if (!tc) return; wxString s;