X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b0d0494ff5a441a73a1d5ec80148777c19df7201..b77b87881bae2e6306366d79e7fe160334b3d4a2:/src/stc/PlatWX.cpp?ds=sidebyside diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 4de8021ab3..ceb50296a6 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -754,6 +754,18 @@ public: Hide(); } + + // On OSX and (possibly others) there can still be pending + // messages/events for the list control when Scintilla wants to + // close it, so do a pending delete of it instead of destroying + // immediately. + bool Destroy() { + if ( !wxPendingDelete.Member(this) ) + wxPendingDelete.Append(this); + return TRUE; + } + + int IconWidth() { wxImageList* il = lv->GetImageList(wxIMAGE_LIST_SMALL); if (il != NULL) {