diff --git a/src/common/event.cpp b/src/common/event.cpp index a2431a5b6c..bab410244b 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -412,10 +412,12 @@ wxString wxCommandEvent::GetString() const return m_cmdString; else { +#if wxUSE_TEXTCTRL wxTextCtrl *txt = wxDynamicCast(m_eventObject, wxTextCtrl); if(txt) return txt->GetValue(); else +#endif // wxUSE_TEXTCTRL return m_cmdString; } }