diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-01-18 15:07:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-01-18 20:36:01 +0000 |
commit | 25c16d260999487284b54cf2794b29b868d05f58 (patch) | |
tree | aed88d009c5f4f5628820d31758ca95cbbb9180f /desktop | |
parent | f93d4062c92e0508dc6a5272350ad98b9f0bfd72 (diff) |
don't crash with --disable-pdfium
Change-Id: Ibc88d9f32ae86f7137c24e2fe1d581ff1cd64497
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145746
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/qa/desktop_lib/test_desktop_lib.cxx | 4 |
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 181366e6a19e..98c734c8190a 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(); |