1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-16 08:34:10 +02:00

Precaution in case a certain assertion fails (I haven't observed it)

This commit is contained in:
Paul Licameli 2017-07-18 14:10:29 -04:00
parent fcd175183f
commit 48889d36f0

View File

@ -383,7 +383,12 @@ UIHandlePtr SelectHandle::HitTest
bool oldUseSnap = true;
if (old) {
// It should not have started listening to timer events
wxASSERT( !old->mTimerHandler );
if( old->mTimerHandler ) {
wxASSERT(false);
// Handle this eventuality anyway, don't leave a dangling back-pointer
// in the attached event handler.
old->mTimerHandler.reset();
}
oldUseSnap = old->mUseSnap;
}