From a4f3565ebd51d2cf437822995e89750ee0bef577 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Tue, 30 Sep 2003 19:04:03 +0000 Subject: [PATCH] More AutoComplete crash fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24014 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/stc/PlatWX.cpp | 10 +++++++++- src/stc/PlatWX.cpp | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index 4de8021ab3..322b64f4cc 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -751,9 +751,17 @@ public: // things to look right... lv->SetFocus(); - 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) { diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 4de8021ab3..322b64f4cc 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -751,9 +751,17 @@ public: // things to look right... lv->SetFocus(); - 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) {