Просмотр исходного кода

【综合】转档偶现Crash优化

niehaoyu 11 месяцев назад
Родитель
Сommit
813e1d4ffa

+ 6 - 2
PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMConvertWindowController.swift

@@ -542,8 +542,12 @@ let kConvertFileSavePath = (kTempSavePath?.stringByAppendingPathComponent("conve
                 print("Error removing item at path: (error.localizedDescription)")
             }
         }
-        self.prePDFView.document = nil
-        self.tempPDFDocument = nil
+        if self.prePDFView.document != nil {
+            self.prePDFView.document = nil
+        }
+        if self.tempPDFDocument != nil {
+            self.tempPDFDocument = nil
+        }
         self.km_quick_endSheet()
     }
     func showCriticalAlert(_ alertMsg: String?) {