소스 검색

also do not crash in debug mode if an image cannot be loaded, may be corrupted, whatnot. it is pretty already, if one wants to investigate, it is easier that way

B. Petersen 2 년 전
부모
커밋
8e5034f941
2개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 0 1
      deltachat-ios/Controller/ContextMenuController.swift
  2. 1 1
      deltachat-ios/Model/GalleryItem.swift

+ 0 - 1
deltachat-ios/Controller/ContextMenuController.swift

@@ -74,7 +74,6 @@ class ContextMenuController: UIViewController {
 
     private func makeImageView(image: UIImage?) -> UIView? {
         guard let image = image else {
-            safe_fatalError("unexpected nil value")
             return nil
         }
 

+ 1 - 1
deltachat-ios/Model/GalleryItem.swift

@@ -70,7 +70,7 @@ class GalleryItem: ContextMenuItem {
         case .webxdc:
             loadWebxdcThumbnail(from: msg)
         default:
-            safe_fatalError("unsupported viewtype - viewtype \(viewtype) not supported.")
+            return
         }
     }