1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Made the assertion in the Timer destructor slightly less strict

This commit is contained in:
ed 2020-11-13 16:12:27 +00:00
parent 884f2c1332
commit 5ae32084a7

View file

@ -321,7 +321,9 @@ Timer::~Timer()
// been stopped before execution reaches this point. A simple way to achieve this
// is to add a call to `stopTimer()` to the destructor of your class which inherits
// from Timer.
jassert (MessageManager::existsAndIsCurrentThread() || ! isTimerRunning());
jassert (! isTimerRunning()
|| MessageManager::getInstanceWithoutCreating() == nullptr
|| MessageManager::getInstanceWithoutCreating()->currentThreadHasLockedMessageManager());
stopTimer();
}