diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-05-01 20:13:39 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2014-05-01 20:13:39 +1000 |
commit | 24ec38a96fa33b75435786caaca04f9cef86c289 (patch) | |
tree | 8befa55a1549f44284248d40972db3cd88f2ecf3 /vcl/source/outdev/font.cxx | |
parent | f2e4bb4b96a7c2176a0dd1dacd9930bf9b68d895 (diff) |
coverity#1209003: Unchecked return value
When AcquireGraphics() is true, then it means that we got the graphics
context.
Change-Id: Id5f4a5fc4456f6ce649fdf3ee63ff6103ba65233
Diffstat (limited to 'vcl/source/outdev/font.cxx')
-rw-r--r-- | vcl/source/outdev/font.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx index bba7c61ad643..e9ae02e07644 100644 --- a/vcl/source/outdev/font.cxx +++ b/vcl/source/outdev/font.cxx @@ -292,8 +292,11 @@ SystemFontData OutputDevice::GetSysFontData(int nFallbacklevel) const SystemFontData aSysFontData; aSysFontData.nSize = sizeof(aSysFontData); - if (!mpGraphics) AcquireGraphics(); - if (mpGraphics) aSysFontData = mpGraphics->GetSysFontData(nFallbacklevel); + if (!mpGraphics) + { + if (AcquireGraphics()) + aSysFontData = mpGraphics->GetSysFontData(nFallbacklevel); + } return aSysFontData; } |