commit 4a156974426fc536de1b0aae75e0e27a4dfec6f7 parent 5b85e6ea2aee94474c7eb46daf764103ebffe9bb Author: Marc Stibane <marc@taler.net> Date: Sun, 16 Feb 2025 11:16:47 +0100 fix crash Diffstat:
| M | TalerWallet1/Views/Transactions/ThreeAmountsSection.swift | | | 7 | ++++--- |
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift b/TalerWallet1/Views/Transactions/ThreeAmountsSection.swift @@ -84,9 +84,10 @@ struct ProductImage: Codable, Hashable { var image: Image? { if let url = NSURL(string: imageBase64) { - let data = NSData(contentsOf: url as URL) - if let uiImage = UIImage(data: data as! Data) { - return Image(uiImage: uiImage) + if let data = NSData(contentsOf: url as URL) { + if let uiImage = UIImage(data: data as Data) { + return Image(uiImage: uiImage) + } } } return nil