diff --git a/MacPass/MPLockDaemon.m b/MacPass/MPLockDaemon.m index e82adef2..9358289e 100644 --- a/MacPass/MPLockDaemon.m +++ b/MacPass/MPLockDaemon.m @@ -76,7 +76,7 @@ } - (void)_willSleepNotification:(NSNotification *)notification { - [[NSApp delegate] lockAllDocuments]; + [(MPAppDelegate *)[NSApp delegate] lockAllDocuments]; } - (void)_checkIdleTime:(NSTimer *)timer { @@ -85,7 +85,7 @@ } NSTimeInterval currentInterval = ([NSDate timeIntervalSinceReferenceDate] - self.lastLocalEventTime); if(self.idleLockTime < currentInterval) { - [[NSApp delegate] lockAllDocuments]; + [(MPAppDelegate *)[NSApp delegate] lockAllDocuments]; /* Reset the timer to full intervall */ [self.idleCheckTimer setFireDate:[NSDate dateWithTimeIntervalSinceNow:_idleLockTime]]; }