diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-11-04 16:20:54 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-05 13:32:19 +0100 |
commit | b932577ba0325144bcdeb91725a51000f7ef3eca (patch) | |
tree | e4e357d0369f1aec4f561f080652082f7c343bd7 /vcl | |
parent | 6d1aafca5d13fa08371a3ff161d12c0f1213555c (diff) |
coverity#1440837 Unchecked return value
Change-Id: I88ad412a55bad26adc1a83ea8e9b310b05513d0d
Reviewed-on: https://gerrit.libreoffice.org/62853
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/outdev/font.cxx | 3 | ||||
-rw-r--r-- | vcl/source/outdev/text.cxx | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index 8cdaebb612df..09e7bdcd2987 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -974,7 +974,8 @@ bool OutputDevice::InitFont() const const LogicalFontInstance* OutputDevice::GetFontInstance() const { - InitFont(); + if (!InitFont()) + return nullptr; return mpFontInstance.get(); } diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index e2e135812ff8..5ebd16294fa2 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -227,7 +227,8 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) pVDev->SetTextColor( COL_BLACK ); pVDev->SetTextFillColor(); pVDev->ImplNewFont(); - pVDev->InitFont(); + if (!pVDev->InitFont()) + return false; pVDev->ImplInitTextColor(); // draw text into upper left corner |