From 57a6a3f881a2166670fd08a164fc6e81880dfaa1 Mon Sep 17 00:00:00 2001 From: Bob Sun Date: Sat, 4 Feb 2017 11:35:28 +0800 Subject: [PATCH] unowned self in closure --- pass/PasswordsViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pass/PasswordsViewController.swift b/pass/PasswordsViewController.swift index 2ab95e5..1d9bad0 100644 --- a/pass/PasswordsViewController.swift +++ b/pass/PasswordsViewController.swift @@ -29,7 +29,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV @IBAction func refreshPasswords(_ sender: UIBarButtonItem) { SVProgressHUD.setDefaultMaskType(.black) SVProgressHUD.show(withStatus: "Pull Remote Repository") - DispatchQueue.global(qos: .userInitiated).async { + DispatchQueue.global(qos: .userInitiated).async { [unowned self] in if PasswordStore.shared.pullRepository(transferProgressBlock: {(git_transfer_progress, stop) in DispatchQueue.main.async { SVProgressHUD.showProgress(Float(git_transfer_progress.pointee.received_objects)/Float(git_transfer_progress.pointee.total_objects), status: "Pull Remote Repository")