1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-29 08:43:56 +01:00

Fix crashes in TCP popup menu items on Windows

This commit is contained in:
Paul Licameli
2017-06-17 19:53:56 -04:00
committed by Paul Licameli
parent 91c86fd937
commit f9865f39ef

View File

@@ -1480,10 +1480,14 @@ try
}
else if (event.ButtonUp()) {
// UIHANDLE RELEASE
auto uiHandle = mUIHandle;
// Null this pointer out first before calling Release -- because on Windows, we can
// come back recursively to this place during handling of the context menu,
// because of a capture lost event.
mUIHandle = nullptr;
UIHandle::Result refreshResult =
mUIHandle->Release( tpmEvent, GetProject(), this );
uiHandle->Release( tpmEvent, GetProject(), this );
ProcessUIHandleResult(this, mRuler, mpClickedTrack, pTrack, refreshResult);
mUIHandle = NULL;
mpClickedTrack = NULL;
// will also Uncapture() below
}