From d03434379ff6c0779112055c1bf7881fa35e0911 Mon Sep 17 00:00:00 2001 From: Jakub Melka Date: Sun, 4 May 2025 19:46:23 +0200 Subject: [PATCH] Issue #272: Crash when deleting page number in single-page PDF with transparency --- .../sources/pdfpagecontenteditorcontentstreambuilder.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Pdf4QtLibCore/sources/pdfpagecontenteditorcontentstreambuilder.cpp b/Pdf4QtLibCore/sources/pdfpagecontenteditorcontentstreambuilder.cpp index a13287f..fd00523 100644 --- a/Pdf4QtLibCore/sources/pdfpagecontenteditorcontentstreambuilder.cpp +++ b/Pdf4QtLibCore/sources/pdfpagecontenteditorcontentstreambuilder.cpp @@ -951,6 +951,7 @@ QByteArray PDFPageContentEditorContentStreamBuilder::selectFont(const QByteArray m_fontDictionary.setEntry(PDFInplaceOrMemoryString(defaultFontKey), defaultFontFactory.takeObject()); } + fontObject = m_fontDictionary.get(defaultFontKey); m_textFont = PDFFont::createFont(fontObject, font, m_document); return defaultFontKey; }