Skip to content
Snippets Groups Projects
Commit 8d91f092 authored by Axel Naumann's avatar Axel Naumann
Browse files

From Andrei: Fix coverity #33862 (dereference null return value)

git-svn-id: http://root.cern.ch/svn/root/trunk@41330 27541ba8-7e3a-0410-8455-c3a389f83636
parent 701c70eb
No related branches found
No related tags found
No related merge requests found
...@@ -364,6 +364,10 @@ Int_t TGeoMCGeometry::Gsvolu(const char *name, const char *shape, Int_t nmed, ...@@ -364,6 +364,10 @@ Int_t TGeoMCGeometry::Gsvolu(const char *name, const char *shape, Int_t nmed,
Vname(shape,vshape); Vname(shape,vshape);
TGeoVolume* vol = GetTGeoManager()->Volume(vname, vshape, nmed, upar, npar); TGeoVolume* vol = GetTGeoManager()->Volume(vname, vshape, nmed, upar, npar);
if (!vol) {
Fatal("Gsvolu", "Could not create volume %s", name);
return -1;
}
return vol->GetNumber(); return vol->GetNumber();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment