fix crash when exporting external file

This commit is contained in:
Le Tan 2021-02-28 09:34:54 +08:00
parent 1b8eb77eab
commit 319da24989

View File

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