@@ -189,7 +189,11 @@ extension KMMergeWindowController {
allPage = file.bAllPage
- let tDocument = PDFDocument(url: NSURL(fileURLWithPath: file.filePath) as URL)!
+ /*防止文件被地址变换后crash*/
+ guard let tDocument = PDFDocument(url: NSURL(fileURLWithPath: file.filePath) as URL) else {
+ print("文件不存在")
+ return
+ }
var outlineArray: [PDFOutline] = []