Fix a crash caused by forced unwrapping a variable

This commit is contained in:
Bob Sun 2017-06-03 17:16:00 -07:00
parent 41764c147d
commit 174128998c
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -54,7 +54,7 @@ class AboutRepositoryTableViewController: BasicStaticTableViewController {
var numberOfCommits: UInt = 0
do {
if let _ = try self.passwordStore.storeRepository!.currentBranch().oid {
if let _ = try self.passwordStore.storeRepository?.currentBranch().oid {
numberOfCommits = self.passwordStore.storeRepository?.numberOfCommits(inCurrentBranch: NSErrorPointer(nilLiteral: ())) ?? 0
}
} catch {