summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-01-18 15:07:29 +0000
committerMichael Stahl <michael.stahl@allotropia.de>2023-01-19 12:12:44 +0000
commit71fe800c7fb70be83a1b4e3c61de61d7cbd3538e (patch)
tree1126219a3d83cfff054c60c6f82cafcc194b33b2 /desktop
parenta44ab07e05521b987c842265184240661e330ea4 (diff)
don't crash with --disable-pdfium
Change-Id: Ibc88d9f32ae86f7137c24e2fe1d581ff1cd64497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145719 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index e7762753775f..c8fe6e733008 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -687,6 +687,10 @@ void DesktopLOKTest::testSaveAsJsonOptions()
OString aOptions("{\"PageRange\":{\"type\":\"string\",\"value\":\"2-\"}}");
CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, maTempFile.GetURL().toUtf8().getStr(), "pdf", aOptions.getStr()));
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ if (!pPDFium)
+ return;
+
// Then make sure the resulting PDF has 2 pages:
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
= parsePDFExport();