diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-05 13:06:20 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-09-05 16:26:50 +0200 |
commit | 45bc0b931eb2569bf267d226b67e58b7b8390529 (patch) | |
tree | 637643ee2773d66fdd07ae918976a76c5f20c7fb | |
parent | 69f19b7d2e538c66bb89f2acaf6e4ad7b0305825 (diff) |
Resolves: tdf#112180: avoid crash with specific ttf
Change-Id: I8cde147279173bffec0c991eb7676f5d4641138d
Reviewed-on: https://gerrit.libreoffice.org/41939
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 942898364291..e51e44ab6032 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -87,9 +87,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 |