Skip to content
Snippets Groups Projects
Commit 6d25638f authored by Pascal Raisig's avatar Pascal Raisig Committed by Pascal Raisig
Browse files

Trd - nullpointer check with meaningful error msg

parent 0f53f654
No related branches found
No related tags found
1 merge request!6Port changes from svn-dev-mcbm2020
......@@ -34,6 +34,12 @@ Bool_t CbmTrdParSetGeo::Init()
CbmTrdGeoHandler geo;
TGeoNode* topNode = gGeoManager->GetTopNode();
TObjArray* nodes = topNode->GetNodes();
if (!nodes)
{
LOG(error) << "CbmTrdParSetGeo::Init: nodes is null!";
return kFALSE;
}
for (Int_t iNode = 0; iNode < nodes->GetEntriesFast(); iNode++) {
TGeoNode* node = static_cast<TGeoNode*>(nodes->At(iNode));
if (!TString(node->GetName()).Contains("trd", TString::kIgnoreCase)) continue; // trd_vXXy top node, e.g. trd_v13a, trd_v14b
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment