vcl/qa/cppunit/pdfexport/pdfexport.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 1c08671f6738c4ff3974406c4588ea8552078a77
Author:     Marc Mondesir <timepilot3...@gmail.com>
AuthorDate: Mon Jul 7 15:55:24 2025 -0700
Commit:     Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
CommitDate: Wed Jul 9 20:19:15 2025 +0200

    pdfexport unit test improvement.
    
    Add assert before using pointer in PdfExportTest::testTdf66597_2.
    
    Change-Id: I5fc0e1d8df5cb99b86ee9eea576cf42c3a90b43b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187508
    Tested-by: Jenkins
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>

diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 07f42e6b03c7..2970c828d5f6 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1717,6 +1717,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf66597_2)
             {
                 auto pName
                     = 
dynamic_cast<vcl::filter::PDFNameElement*>(pObject->Lookup("BaseFont"_ostr));
+                CPPUNIT_ASSERT_MESSAGE("No BaseFont element found in font!", 
pName);
                 auto aName = pName->GetValue().copy(7); // skip the subset id
                 CPPUNIT_ASSERT_EQUAL_MESSAGE("Unexpected font name", 
"ReemKufi-Regular"_ostr,
                                              aName);

Reply via email to