diff --git a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDetectorManager.cxx b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDetectorManager.cxx
index 644ca48a3fc765f6c353b2c0e16021778b4cccf0..3a5d6b31558648e45463d95e8978d5bf7bf73632 100755
--- a/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDetectorManager.cxx
+++ b/InnerDetector/InDetDetDescr/PixelReadoutGeometry/src/PixelDetectorManager.cxx
@@ -600,6 +600,10 @@ namespace InDetDD {
           return alignmentChange;
        }
     }
+    // Avoid cppcheck warning.
+    if (!atrlistcol) {
+      return alignmentChange;
+    }
     {
       // loop over objects in collection
       //cppcheck-suppress nullPointerRedundantCheck
diff --git a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_DetectorManager.cxx b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_DetectorManager.cxx
index 9c47b473fdd0d52a65f142f977a3e06e32a660e6..a6595c910762605e935194a891c9a6b84c8c4c6d 100755
--- a/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_DetectorManager.cxx
+++ b/InnerDetector/InDetDetDescr/TRT_ReadoutGeometry/src/TRT_DetectorManager.cxx
@@ -545,6 +545,10 @@ namespace InDetDD {
           return alignmentChange;
        }
     }
+    // Avoid cppcheck warning.
+    if (!atrlistcol) {
+      return alignmentChange;
+    }
     {
       // loop over objects in collection
       //cppcheck-suppress nullPointerRedundantCheck