From c6110c09b52a047662907418eb888b498c821fae Mon Sep 17 00:00:00 2001 From: reuk Date: Mon, 21 Oct 2024 14:06:54 +0100 Subject: [PATCH] Timer: Warn if the TimerThread outlives the ScopedJuceIniitaliser_GUI --- modules/juce_events/timers/juce_Timer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/juce_events/timers/juce_Timer.cpp b/modules/juce_events/timers/juce_Timer.cpp index 1766223764..4c3de7eec1 100644 --- a/modules/juce_events/timers/juce_Timer.cpp +++ b/modules/juce_events/timers/juce_Timer.cpp @@ -95,6 +95,9 @@ public: ~TimerThread() override { + // If this is hit, a timer has outlived the platform event system. + jassert (MessageManager::getInstanceWithoutCreating() != nullptr); + stopThreadAsync(); ShutdownDetector::removeListener (this); stopThread (-1);