diff --git a/AKImageCropperViewExample/ImagesTableViewController.swift b/AKImageCropperViewExample/ImagesTableViewController.swift index cec293e..93b8b91 100644 --- a/AKImageCropperViewExample/ImagesTableViewController.swift +++ b/AKImageCropperViewExample/ImagesTableViewController.swift @@ -57,7 +57,13 @@ extension ImagesTableViewController { // Configure the cell... cell.textLabel!.text = name.components(separatedBy: "-").joined(separator: " ") - cell.detailTextLabel?.text = String(format: "Size %0.1f x %0.1f", image?.size.width as CGFloat?, image?.size.height as CGFloat?) + + guard let image = image else { + cell.detailTextLabel?.text = "No image" + return cell; + } + + cell.detailTextLabel?.text = String(format: "Size %0.1f x %0.1f", image.size.width, image.size.height) return cell }