diff --git a/core/detectors/trd/CbmTrdParSetGeo.cxx b/core/detectors/trd/CbmTrdParSetGeo.cxx
index 7fb6e00c7fec58e1c2d034ccebe2ab53d8417fe1..043c05a63b21aa44fb966adb74af84191085e7dc 100644
--- a/core/detectors/trd/CbmTrdParSetGeo.cxx
+++ b/core/detectors/trd/CbmTrdParSetGeo.cxx
@@ -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