Skip to content

Commit

Permalink
Unowned refrence when taking picutre fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Bernad committed Nov 30, 2017
1 parent d3af69d commit a18559f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/ImagePickerController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ open class ImagePickerController: UIViewController {
isTakingPicture = true
bottomContainer.pickerButton.isEnabled = false
bottomContainer.stackView.startLoader()
let action: () -> Void = { [unowned self] in
let action: () -> Void = { [weak self] in
guard let `self` = self else { return }
self.cameraController.takePicture { self.isTakingPicture = false }
}

Expand Down

0 comments on commit a18559f

Please sign in to comment.