lcio/src/java/hep/lcio/util
diff -u -r1.12 -r1.13
--- Printer.java 3 Sep 2008 00:03:00 -0000 1.12
+++ Printer.java 20 May 2010 20:43:47 -0000 1.13
@@ -998,11 +998,18 @@
if (havehits)
{
ps.print(" hits ->");
- List hits = trk.getTrackerHits() ;
+ List hits = trk.getTrackerHits();
+ if (hits == null || hits.size() == 0) continue;
for(int j=0; j<hits.size(); j++)
{
- ps.format("[%08x] ",
- Integer.valueOf(hits.get(j).hashCode())) ;
+ // Guard against null hit. For some reason, above checks for null
+ // list and size of zero don't cover all cases where this may fail.
+ try
+ {
+ ps.format("[%08x] ", Integer.valueOf(hits.get(j).hashCode())) ;
+ }
+ catch (NullPointerException x)
+ {}
}
ps.println();
}