summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2016-05-24 17:24:16 -0400
committerAshod Nakashian <ashnakash@gmail.com>2016-05-25 23:11:39 +0000
commitb2f994469f3e2f1fe72e9f103b840aa949ace6dd (patch)
treec44c55836166be89ad9092ca84eac07c8f215272 /vcl/source/outdev
parent61b43a02cc2b19cc39e801d68714958398d4a401 (diff)
lok: reset the font list when there are no items
In the pre-init stage the devices were initialized with no font list, but later the font list is updated. So those devices were not updated. Change-Id: I157d4c7079f9b1252916eb92b512aadb8e77329f Reviewed-on: https://gerrit.libreoffice.org/25419 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/font.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index c6c4f4f6bb34..01aa8419b67c 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -74,9 +74,19 @@ int OutputDevice::GetDevFontCount() const
if( !mpDeviceFontList )
{
if (!mpFontCollection)
+ {
return 0;
+ }
mpDeviceFontList = mpFontCollection->GetDeviceFontList();
+
+ if (!mpDeviceFontList->Count())
+ {
+ delete mpDeviceFontList;
+ mpDeviceFontList = nullptr;
+
+ return 0;
+ }
}
return mpDeviceFontList->Count();
}