Skip to content

Commit

Permalink
Dispatch failure on main queue to prevent crash
Browse files Browse the repository at this point in the history
  • Loading branch information
alfavata committed Nov 11, 2024
1 parent 9fa582f commit e914798
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/CodeScanner/ScannerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,9 @@ extension CodeScannerView {
}

func didFail(reason: ScanError) {
parentView.completion(.failure(reason))
DispatchQueue.main.async {
parentView.completion(.failure(reason))
}
}

}
Expand Down

0 comments on commit e914798

Please sign in to comment.