diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index 89ec54016b..d77833bb16 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -991,7 +991,9 @@ void wxOwnerDrawnComboBox::DoClear() GetVListBoxComboPopup()->Clear(); - wxTextEntry::Clear(); + // There is no text entry when using wxCB_READONLY style, so test for it. + if ( GetTextCtrl() ) + wxTextEntry::Clear(); } void wxOwnerDrawnComboBox::Clear()