From 319da24989a16114240b9d2ccf3b233e5df5a327 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Sun, 28 Feb 2021 09:34:54 +0800 Subject: [PATCH] fix crash when exporting external file --- src/export/exporter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/export/exporter.cpp b/src/export/exporter.cpp index 17c5a91d..cfbaf8ec 100644 --- a/src/export/exporter.cpp +++ b/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),