diff options
author | Roopesh Chander <roop@roopc.net> | 2019-06-09 23:47:05 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2019-06-09 23:55:44 +0530 |
commit | 6a6be9edde58ab9ad550d0b80ba256006f1a0396 (patch) | |
tree | dda8f526780dc4cea270e6299aeb84cde023813c | |
parent | on-demand: Don't crash on encountering unexpected on-demand rules (diff) | |
download | wireguard-apple-6a6be9edde58ab9ad550d0b80ba256006f1a0396.tar.xz wireguard-apple-6a6be9edde58ab9ad550d0b80ba256006f1a0396.zip |
on-demand: iOS: Fix crash on selecting Any SSID when already selected
Signed-off-by: Roopesh Chander <roop@roopc.net>
-rw-r--r-- | WireGuard/WireGuard/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift index 1256f56..8740f06 100644 --- a/WireGuard/WireGuard/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift +++ b/WireGuard/WireGuard/UI/iOS/ViewController/SSIDOptionEditTableViewController.swift @@ -266,6 +266,10 @@ extension SSIDOptionEditTableViewController { case .ssidOption: let previousOption = selectedOption selectedOption = ssidOptionFields[indexPath.row] + guard previousOption != selectedOption else { + tableView.deselectRow(at: indexPath, animated: true) + return + } loadSections() if previousOption == .anySSID { let indexSet = IndexSet(1 ... 2) |