Skip to content

Commit 952c7a2

Browse files
committed
Fix unowned self
1 parent bb1d610 commit 952c7a2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ios/brave-ios/Sources/Brave/Frontend/Browser/Toolbars/BottomToolbar/Menu/Bookmarks/BookmarksViewController.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,15 +267,17 @@ class BookmarksViewController: SiteTableViewController, ToolbarUrlActionsProtoco
267267
let alert = AlertController(title: nil, message: nil, preferredStyle: .actionSheet)
268268
alert.popoverPresentationController?.barButtonItem = sender
269269
let importAction = UIAlertAction(title: Strings.bookmarksImportAction, style: .default) {
270-
[unowned self] _ in
270+
[weak self] _ in
271+
guard let self = self else { return }
271272
let vc = UIDocumentPickerViewController(forOpeningContentTypes: [.html, .zip])
272273
vc.delegate = self
273274
self.present(vc, animated: true)
274275
}
275276

276277
let exportAction = UIAlertAction(title: Strings.bookmarksExportAction, style: .default) {
277-
[unowned self] _ in
278+
[weak self] _ in
278279
Task {
280+
guard let self = self else { return }
279281
let fileUrl = FileManager.default.temporaryDirectory
280282
.appendingPathComponent("Bookmarks")
281283
.appendingPathExtension("html")

0 commit comments

Comments
 (0)