1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-11 00:53:46 +02:00

Bug 1672 - OS window close button crashes Audacity if Screenshot Tools are open. File > Close hides Screenshot tools and then any closure method crashes Audacity.

This commit is contained in:
James Crook
2017-07-03 19:47:33 +01:00
parent 0e21143cee
commit 51c5c73b3b

View File

@@ -109,7 +109,13 @@ void OpenScreenshotTools()
void CloseScreenshotTools()
{
mFrame.reset();
// The code below looks like a memory leak,
// but actually wxWidgets will take care of deleting the
// screenshot window, becuase the parent window is
// being deleted. So we only need to free up our pointer
// to it, not actually delete the underlying object.
if( mFrame )
mFrame.release();
}
////////////////////////////////////////////////////////////////////////////////