diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-09-20 11:36:19 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-20 13:54:54 +0200 |
commit | af174dbad4f4dc896bc090215d08c12d080b8e72 (patch) | |
tree | f8c5e5030b5c6a6ceccf8ca8391ad74aca2eaf4e /vcl | |
parent | 71c36484f4916dec673831bf14afbf6b2b1e756b (diff) |
cid#1466875 Dereference null return value
Change-Id: I6208d2d6e6592db89223c8a8705f7f1ba066f16e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103068
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/salgdilayout.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index 02c316b7b39d..f277970b6671 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -1020,6 +1020,8 @@ bool SalGraphics::CreateCFFfontSubset(const unsigned char* pFontBytes, int nByte int nGlyphCount, FontSubsetInfo& rInfo) { FILE* pOutFile = fopen(rSysPath.getStr(), "wb"); + if (!pOutFile) + return false; rInfo.LoadFont(FontType::CFF_FONT, pFontBytes, nByteLength); bool bRet = rInfo.CreateFontSubset(FontType::TYPE1_PFB, pOutFile, nullptr, pGlyphIds, pEncoding, nGlyphCount, pGlyphWidths); |