summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-09-05 13:06:20 +0100
committerAndras Timar <andras.timar@collabora.com>2017-09-26 10:36:33 +0200
commite028c4e5d7d00536dfdba81a3ca35e7a39b2da5e (patch)
tree1c040f49b008304dae51a25a1a4367d57af85097 /vcl
parentc9c1cdb332796c6601ef713553101ea5c7b086e7 (diff)
Resolves: tdf#112180: avoid crash with specific ttf
Change-Id: I8cde147279173bffec0c991eb7676f5d4641138d Reviewed-on: https://gerrit.libreoffice.org/41935 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit f263692de96ac68e73eeb953b7e92a18d149f30e) Reviewed-on: https://gerrit.libreoffice.org/42507 (cherry picked from commit 70f8b4b9b0330b9150c5d6c3f066834f20023578)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/gdi/salfont.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 8c120c00881f..cb9899a303af 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -90,9 +90,9 @@ RawFontData::RawFontData( HDC hDC, DWORD nTableTag )
{
// get required size in bytes
mnByteCount = ::GetFontData( hDC, nTableTag, 0, nullptr, 0 );
- if( mnByteCount == GDI_ERROR )
- return;
- else if( !mnByteCount )
+ if (mnByteCount == GDI_ERROR)
+ mnByteCount = 0;
+ if (!mnByteCount)
return;
// allocate the array