From 24ec38a96fa33b75435786caaca04f9cef86c289 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Thu, 1 May 2014 20:13:39 +1000 Subject: coverity#1209003: Unchecked return value When AcquireGraphics() is true, then it means that we got the graphics context. Change-Id: Id5f4a5fc4456f6ce649fdf3ee63ff6103ba65233 --- vcl/source/outdev/font.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'vcl/source/outdev/font.cxx') 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; } -- cgit