diff options
authorJan-Marek Glogowski <>2021-10-06 23:17:43 +0200
committerThorsten Behrens <>2022-05-18 12:37:14 +0200
commit4f9aa74490f12de5d35e8df51add043ce597627f (patch)
parent2c1d1b32f4ddfdffedb27bec5c906c7c8cb26cd6 (diff)
tdf#144952 VCL fix the Printer graphics releasecib-6.4-8
Regression from commit 1b7c53db87bb67eeb2591fbb186f7ac20eb00c68 ("WIN lazy init WinSalInfoPrinter graphics"), which removed the // HACK to fix an urgent P1 printing issue fast SalPrinter::StartPage returns a SalGraphics to the VCL Printer object. On Windows SalPrinter::EndPage deletes the SalPrinter's SalGraphics. MacOS keeps a single SalGraphics for the whole SalPrinter lifetime. PspSalPrinter stores it in a unique_ptr and always resets it in StartPage. But in any case the VCL Printer's SalGraphics reference must be freed before calling a function, which might delete it. Change-Id: Ice528b2bbc89eaadff576420bf210ea4ec1e58d5 Reviewed-on: Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <> (cherry picked from commit 354706e3f5c05294af6e0000d5b9f814cfe01741)
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 09f3dbda47e2..d197a636d574 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1599,8 +1599,8 @@ void Printer::ImplEndPage()
if ( mpPrinter )
- mpPrinter->EndPage();
+ mpPrinter->EndPage();
mbDevOutput = false;
mpJobGraphics = nullptr;