소스 검색

fix crash when exporting external file

Le Tan 4 년 전
부모
커밋
319da24989
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      src/export/exporter.cpp

+ 3 - 0
src/export/exporter.cpp

@@ -80,6 +80,9 @@ void Exporter::exportAttachments(Node *p_node,
                                  const QString &p_outputFolder,
                                  const QString &p_destFilePath)
 {
+    if (!p_node) {
+        return;
+    }
     const auto &attachmentFolder = p_node->getAttachmentFolder();
     if (!attachmentFolder.isEmpty()) {
         auto relativePath = PathUtils::relativePath(PathUtils::parentDirPath(p_srcFilePath),