diff --git a/source/utils/CarlaMainLoop.hpp b/source/utils/CarlaMainLoop.hpp index 4c3031b7e..b8852286d 100644 --- a/source/utils/CarlaMainLoop.hpp +++ b/source/utils/CarlaMainLoop.hpp @@ -33,14 +33,15 @@ static inline bool runMainLoopOnce() { #if defined(CARLA_OS_MAC) - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + NSAutoreleasePool* const pool = [[NSAutoreleasePool alloc] init]; + NSDate* const date = [NSDate distantPast]; NSEvent* event; for (;;) { event = [NSApp nextEventMatchingMask:NSAnyEventMask - untilDate:[NSDate distantPast] + untilDate:date inMode:NSDefaultRunLoopMode dequeue:YES];