diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-05 13:06:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-05 15:02:13 +0200 |
commit | f263692de96ac68e73eeb953b7e92a18d149f30e (patch) | |
tree | af6598c37fda8ba4a19751fe454b265e197f22a9 | |
parent | 2bfb174ec57c78236e2350c8ae3be9bf524e811c (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>
-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 dc6d2c51692b..f463ecb20417 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 |