diff --git a/MiniKeePass/MiniKeePassAppDelegate.m b/MiniKeePass/MiniKeePassAppDelegate.m index fcf09ba4..2712becb 100644 --- a/MiniKeePass/MiniKeePassAppDelegate.m +++ b/MiniKeePass/MiniKeePassAppDelegate.m @@ -275,10 +275,11 @@ - (void)handlePasteboardNotification:(NSNotification *)notification { // Get the clear clipboard timeout (in seconds) NSInteger clearClipboardTimeout = [appSettings clearClipboardTimeout]; - + + UIApplication *application = [UIApplication sharedApplication]; + // Initiate a background task __block UIBackgroundTaskIdentifier bgTask; - UIApplication *application = [UIApplication sharedApplication]; bgTask = [application beginBackgroundTaskWithExpirationHandler:^{ // End the background task [application endBackgroundTask:bgTask];