diff options
author | Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de> | 2019-11-18 16:04:24 +0000 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2019-11-19 03:13:33 +0100 |
commit | f8e1f8652255cadd80a991aa3e059ee631b333b8 (patch) | |
tree | cbe314f07dea9aff9f444faafa9abbe7eb51db56 /vcl/qt5 | |
parent | e6aac0b637d583d3cfb893276f813ff5aa1ade17 (diff) |
tdf#128434 correctly release fonts in destructors
This adds ReleaseFonts() calls to all destructors of SalGraphics
and TextRenderImpl derivated classes, which implement SetFont.
During destruction a base class can't call into derivated classes,
as these are already destructed, so we have to spread these calls
manually.
Change-Id: Ia57db04f7df665e5205212ce512119e2f60e3379
Reviewed-on: https://gerrit.libreoffice.org/82967
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/qt5')
-rw-r--r-- | vcl/qt5/Qt5Graphics.cxx | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/vcl/qt5/Qt5Graphics.cxx b/vcl/qt5/Qt5Graphics.cxx index 5192f0b42416..8228699a2602 100644 --- a/vcl/qt5/Qt5Graphics.cxx +++ b/vcl/qt5/Qt5Graphics.cxx @@ -44,16 +44,7 @@ Qt5Graphics::Qt5Graphics( Qt5Frame *pFrame, QImage *pQImage ) m_pWidgetDraw.reset(new Qt5Graphics_Controls()); } -Qt5Graphics::~Qt5Graphics() -{ - // release the text styles - for (int i = 0; i < MAX_FALLBACK; ++i) - { - if (!m_pTextStyle[i]) - break; - m_pTextStyle[i].clear(); - } -} +Qt5Graphics::~Qt5Graphics() { ReleaseFonts(); } void Qt5Graphics::ChangeQImage(QImage* pQImage) { |