1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-05 15:09:08 +02:00

Various other drags could crash Mac debug build if you option-W. Fixed too...

... And I think this fix is now exhaustive.
This commit is contained in:
Paul Licameli 2016-04-25 01:49:22 -04:00
parent ece29b3ff3
commit d34715d6ad
4 changed files with 14 additions and 0 deletions

View File

@ -1078,6 +1078,10 @@ AudacityProject::AudacityProject(wxWindow * parent, wxWindowID id,
AudacityProject::~AudacityProject() AudacityProject::~AudacityProject()
{ {
// Tool manager gives us capture sometimes
if(HasCapture())
ReleaseMouse();
if (wxGetApp().GetRecentFiles()) if (wxGetApp().GetRecentFiles())
{ {
wxGetApp().GetRecentFiles()->RemoveMenu(mRecentFilesMenu); wxGetApp().GetRecentFiles()->RemoveMenu(mRecentFilesMenu);

View File

@ -112,6 +112,8 @@ ToolBarResizer::ToolBarResizer(ToolBar *bar)
ToolBarResizer::~ToolBarResizer() ToolBarResizer::~ToolBarResizer()
{ {
if(HasCapture())
ReleaseMouse();
} }
/* /*

View File

@ -155,6 +155,12 @@ class ToolFrame final : public wxFrame
} }
} }
~ToolFrame()
{
if(HasCapture())
ReleaseMouse();
}
// //
// Transition a toolbar from float to dragging // Transition a toolbar from float to dragging
// //

View File

@ -187,6 +187,8 @@ AButton::AButton(wxWindow * parent,
AButton::~AButton() AButton::~AButton()
{ {
if(HasCapture())
ReleaseMouse();
} }
void AButton::Init(wxWindow * parent, void AButton::Init(wxWindow * parent,