1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-03 17:39:25 +02:00

Some NULL checks... somehow I crashed on Mac but can't repeat now

This commit is contained in:
Paul Licameli 2018-01-21 23:50:10 -05:00
parent 336b2a8fe2
commit 58b44baf05

View File

@ -1168,7 +1168,8 @@ void ToolManager::OnMouse( wxMouseEvent & event )
// Button was released...finish the drag
// Transition the bar to a dock
if (!mDidDrag) {
mPrevDock->RestoreConfiguration(mPrevConfiguration);
if (mPrevDock)
mPrevDock->RestoreConfiguration(mPrevConfiguration);
DoneDragging();
return;
}
@ -1200,7 +1201,8 @@ void ToolManager::OnMouse( wxMouseEvent & event )
mp = mParent->ClientToScreen(mp);
if (!mDragWindow) {
// We no longer have control
mPrevDock->GetConfiguration().Remove( mDragBar );
if (mPrevDock)
mPrevDock->GetConfiguration().Remove( mDragBar );
UndockBar(mp);
}
}