From: sgorbuno Date: Sat, 12 Mar 2011 10:37:45 +0000 (+0000) Subject: coverity warning 15095 fixed X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=cda9e12874452ca4f93ba7711ac65a80450408a1 coverity warning 15095 fixed --- diff --git a/HLT/global/AliHLTGlobalVertexerHistoComponent.cxx b/HLT/global/AliHLTGlobalVertexerHistoComponent.cxx index eff79c6f0a7..bd8d70ad500 100644 --- a/HLT/global/AliHLTGlobalVertexerHistoComponent.cxx +++ b/HLT/global/AliHLTGlobalVertexerHistoComponent.cxx @@ -284,20 +284,24 @@ int AliHLTGlobalVertexerHistoComponent::DoEvent(const AliHLTComponentEventData& const AliESDVertex *vertexGlobal = 0; - for ( const TObject *iter = GetFirstInputObject(kAliHLTDataTypeESDVertex|kAliHLTDataOriginITS); iter != NULL; iter = GetNextInputObject() ) { - if( !( vertexITS = dynamic_cast(const_cast( iter ) ) ) ){ - HLTError("ITS SPD vertex object is corrupted"); - iResult = -EINVAL; + { + const TObject *iter = GetFirstInputObject(kAliHLTDataTypeESDVertex|kAliHLTDataOriginITS); + if( iter != NULL ) { + if( !( vertexITS = dynamic_cast(const_cast( iter ) ) ) ){ + HLTError("ITS SPD vertex object is corrupted"); + iResult = -EINVAL; + } } - break; } - for ( const TObject *iter = GetFirstInputObject(kAliHLTDataTypeESDVertex|kAliHLTDataOriginOut); iter != NULL; iter = GetNextInputObject() ) { - if( !( vertexGlobal = dynamic_cast(const_cast( iter ) ) ) ){ - HLTError("Global vertex object is corrupted"); - iResult = -EINVAL; + { + const TObject *iter = GetFirstInputObject(kAliHLTDataTypeESDVertex|kAliHLTDataOriginOut); + if( iter != NULL ){ + if( !( vertexGlobal = dynamic_cast(const_cast( iter ) ) ) ){ + HLTError("Global vertex object is corrupted"); + iResult = -EINVAL; + } } - break; } if( !vertexITS || !vertexGlobal ){