Fix the crash-on-ActiveX-callback problem

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2002-07-06 00:55:46 +00:00
parent bd5dfc0725
commit 763d71e442
2 changed files with 16 additions and 1 deletions

View File

@@ -586,7 +586,15 @@ void wxPySaveThreadState(PyThreadState* tstate) {
for(size_t i=0; i < wxPyTStates->GetCount(); i++) {
wxPyThreadState& info = wxPyTStates->Item(i);
if (info.tid == ctid) {
info.tstate = tstate;
#if 0
if (info.tstate != tstate)
wxLogMessage("*** tstate mismatch!???");
#endif
// info.tstate = tstate; *** DO NOT updating existing ones???
// Normally it will never change, but apparently COM callbacks
// (i.e. ActiveX controls) will (incorrectly IMHO) use a transient
// tstate wich will then be garbage the next time we try to use
// it...
wxPyTMutex->Unlock();
return;
}