Преглед на файлове

【综合】转档偶现Crash优化

niehaoyu преди 11 месеца
родител
ревизия
813e1d4ffa
променени са 1 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 6 2
      PDF Office/PDF Master/Class/PDFTools/Convert/NewController/KMConvertWindowController.swift

+ 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?) {