From 81e3760e4a9587de9e74def6fb1d1bb157dcfa9c Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sat, 4 Jul 2020 15:05:17 +0200 Subject: [PATCH] avoiding assertion on macOS in wxOwnerDrawnComboBox::DoClear wxTextEntry on macOS is calling GetEditableWindow to arrive at the native text entry view, which in this case fails, so route things directly --- src/generic/odcombo.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/generic/odcombo.cpp b/src/generic/odcombo.cpp index fd3061e414..9c0a21a489 100644 --- a/src/generic/odcombo.cpp +++ b/src/generic/odcombo.cpp @@ -988,7 +988,14 @@ void wxOwnerDrawnComboBox::DoClear() // There is no text entry when using wxCB_READONLY style, so test for it. if ( GetTextCtrl() ) + { +#ifdef __WXOSX__ + // this has to be rerouted to the text control explicitly on macOS + GetTextCtrl()->Clear(); +#else wxTextEntry::Clear(); +#endif + } } void wxOwnerDrawnComboBox::Clear()