X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b11752c4f9e1fd4b11ba3d184246267facb3ad3..c437b3f4e47b74715a2f2385d4862972babd7802:/src/common/process.cpp diff --git a/src/common/process.cpp b/src/common/process.cpp index 9bdda8b638..26e14c560e 100644 --- a/src/common/process.cpp +++ b/src/common/process.cpp @@ -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; } // ----------------------------------------------------------------------------