]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix crash
authorRobert Roebling <robert@roebling.de>
Sat, 13 Sep 2008 20:02:59 +0000 (20:02 +0000)
committerRobert Roebling <robert@roebling.de>
Sat, 13 Sep 2008 20:02:59 +0000 (20:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/editors.cpp

index 6e677a242ffb09b61df4becd832fe712e7e9f4fa..6088249d8658f1e0851dc8ce7ab1953ed5808993 100644 (file)
@@ -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;