From 5dd741f6fa4d89489581e0ba03e9d938e16ddb8e Mon Sep 17 00:00:00 2001 From: Bob Sun Date: Wed, 15 Mar 2017 23:03:43 -0700 Subject: [PATCH] Fix #57. Casting cell class to parent cell class will trigger the crash. --- pass/Controllers/AddPasswordTableViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pass/Controllers/AddPasswordTableViewController.swift b/pass/Controllers/AddPasswordTableViewController.swift index d824c92..55119d8 100644 --- a/pass/Controllers/AddPasswordTableViewController.swift +++ b/pass/Controllers/AddPasswordTableViewController.swift @@ -34,7 +34,7 @@ class AddPasswordTableViewController: PasswordEditorTableViewController { return false } // check name - let nameCell = tableView.cellForRow(at: IndexPath(row: 0, section: 0)) as! ContentTableViewCell + let nameCell = tableView.cellForRow(at: IndexPath(row: 0, section: 0)) as! TextFieldTableViewCell if nameCell.getContent()!.isEmpty { let alertTitle = "Cannot Add Password" let alertMessage = "Please fill in the name."