Skip to content
Snippets Groups Projects
Commit b05c97c3 authored by Sergey Gorbunov's avatar Sergey Gorbunov
Browse files

CA: a protection for the null ptr

parent bbc1a42b
No related branches found
No related tags found
1 merge request!1183L1: get rid of material budget files
Pipeline #23524 failed
......@@ -206,7 +206,11 @@ L1Material MaterialHelper::GenerateMaterialMap(double zRef, double zMin, double
bool doContinue = 1;
for (int iStep = 0; doContinue; iStep++) {
if (!node) { LOG(fatal) << "ca::tools::MaterialHelper: TGeoNavigator can not find the geo node"; }
if (!node) {
// may happen when tracing outside of the CBM volume -> produce a warning
LOG(warning) << "ca::tools::MaterialHelper: TGeoNavigator can not find the geo node";
break;
}
TGeoMedium* medium = node->GetMedium();
if (!medium) { LOG(fatal) << "ca::tools::MaterialHelper: TGeoNavigator can not find the geo medium"; }
......
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