From 9c2acd4ae13f84df1febea82ed539204149cf12b Mon Sep 17 00:00:00 2001
From: Bertrand Bellenot <Bertrand.Bellenot@cern.ch>
Date: Wed, 5 Oct 2011 14:08:48 +0000
Subject: [PATCH] Fix coverity report (Dereference null return value )

git-svn-id: http://root.cern.ch/svn/root/trunk@41159 27541ba8-7e3a-0410-8455-c3a389f83636
---
 gui/gui/src/TGSpeedo.cxx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gui/gui/src/TGSpeedo.cxx b/gui/gui/src/TGSpeedo.cxx
index ac5a7d32cab..89f7184ed24 100644
--- a/gui/gui/src/TGSpeedo.cxx
+++ b/gui/gui/src/TGSpeedo.cxx
@@ -122,12 +122,15 @@ void TGSpeedo::Build()
    Int_t i, nexe, offset;
 
    const TGFont *counterFont = fClient->GetFont("-*-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*");
+   if (!counterFont) return;
    fCounterFS = counterFont->GetFontStruct();
 
    const TGFont *textFont = fClient->GetFont("-*-helvetica-bold-r-*-*-8-*-*-*-*-*-*-*");
+   if (!textFont) return;
    fTextFS = textFont->GetFontStruct();
 
    const TGFont *labelFont = fClient->GetFont("-*-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*");
+   if (!labelFont) return;
    FontStruct_t labelFS = labelFont->GetFontStruct();
 
    if (fImage && fImage->IsValid()) {
-- 
GitLab