summaryrefslogtreecommitdiff
diff options
authorCaolán McNamara <caolan.mcnamara@collabora.com>2025-04-28 08:51:49 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2025-04-28 11:35:37 +0200
commitd2d70d8a31194110380d6f8339480ec68f1197b0 (patch)
tree57f72ebe78a49d305186b4d7b7aa9b9912e7326f
parent358c62e05f902eb601e00465b67154e30a42738a (diff)
cid#1646742 Dereference after null check
Change-Id: Id159ca8de614671db51fafb0e487d4d4f4548fbf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184703 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r--sdext/source/pdfimport/filterdet.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx
index 8689b190b755..9d97b69b613d 100644
--- a/sdext/source/pdfimport/filterdet.cxx
+++ b/sdext/source/pdfimport/filterdet.cxx
@@ -374,7 +374,7 @@ uno::Reference<io::XStream> getEmbeddedFile(const OUString& rInPDFFileURL,
}
bAgain = false;
// The new style hybrids have exactly one embedded file
- if (pPdfiumDoc->getAttachmentCount() != 1)
+ if (!pPdfiumDoc || pPdfiumDoc->getAttachmentCount() != 1)
{
SAL_INFO("sdext.pdfimport", "getEmbeddedFile incorrect attachment count");
break;
close