X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a387938f80a2804f259e7305513231be39620fd2..8f4745feeb2850f3bebb3af45407e164550d541a:/src/common/process.cpp diff --git a/src/common/process.cpp b/src/common/process.cpp index 36764bf2f5..26e14c560e 100644 --- a/src/common/process.cpp +++ b/src/common/process.cpp @@ -30,7 +30,7 @@ // event tables and such // ---------------------------------------------------------------------------- -DEFINE_EVENT_TYPE(wxEVT_END_PROCESS) +wxDEFINE_EVENT( wxEVT_END_PROCESS, wxProcessEvent ); IMPLEMENT_DYNAMIC_CLASS(wxProcess, wxEvtHandler) IMPLEMENT_DYNAMIC_CLASS(wxProcessEvent, wxEvent) @@ -102,7 +102,13 @@ void wxProcess::OnTerminate(int pid, int status) void wxProcess::Detach() { - SetNextHandler(NULL); + // we just detach from the next handler of the chain (i.e. our "parent" -- see ctor) + // not also from the previous handler like wxEvtHandler::Unlink() would do: + + if (m_nextHandler) + m_nextHandler->SetPreviousHandler(m_previousHandler); + + m_nextHandler = NULL; } // ----------------------------------------------------------------------------