Commit 367628a3 authored by Carola Nitz's avatar Carola Nitz

VLCKeychainCoordinator: nil completion block instead of making it weak to avoid crashes

parent a3ed2d32
......@@ -20,7 +20,7 @@ NSString *const VLCPasscode = @"org.videolan.vlc-ios.passcode";
@interface VLCKeychainCoordinator () <PAPasscodeViewControllerDelegate>
{
PAPasscodeViewController *_passcodeLockController;
__weak void (^_completion)(void);
void (^_completion)(void);
BOOL _avoidPromptingTouchID;
}
......@@ -136,6 +136,7 @@ NSString *const VLCPasscode = @"org.videolan.vlc-ios.passcode";
if (success) {
[[UIApplication sharedApplication].delegate.window.rootViewController dismissViewControllerAnimated:YES completion:^{
_completion();
_completion = nil;
}];
}
});
......@@ -148,6 +149,7 @@ NSString *const VLCPasscode = @"org.videolan.vlc-ios.passcode";
_avoidPromptingTouchID = NO;
[[UIApplication sharedApplication].delegate.window.rootViewController dismissViewControllerAnimated:YES completion:^{
_completion();
_completion = nil;
}];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment