diff --git a/common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CodaEventDecoder.java b/common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CodaEventDecoder.java index bef9ba4504..3a7703dad1 100644 --- a/common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CodaEventDecoder.java +++ b/common-tools/clas-detector/src/main/java/org/jlab/detector/decode/CodaEventDecoder.java @@ -9,6 +9,7 @@ import org.jlab.coda.jevio.ByteDataTransformer; import org.jlab.coda.jevio.CompositeData; import org.jlab.coda.jevio.DataType; +import org.jlab.coda.jevio.EvioCompactStructureHandler; import org.jlab.coda.jevio.EvioException; import org.jlab.coda.jevio.EvioNode; import org.jlab.detector.decode.DetectorDataDgtz.ADCData; @@ -309,6 +310,8 @@ public List getEventBranches(EvioDataEvent event){ ArrayList branches = new ArrayList<>(); try { + EvioCompactStructureHandler ecsh = event.getStructureHandler(); + if (ecsh == null) return branches; List eventNodes = event.getStructureHandler().getNodes(); if(eventNodes==null){ return branches; diff --git a/common-tools/clas-io/src/main/java/org/jlab/io/evio/EvioDataEventHandler.java b/common-tools/clas-io/src/main/java/org/jlab/io/evio/EvioDataEventHandler.java index cae3f5c028..f028b4cd85 100644 --- a/common-tools/clas-io/src/main/java/org/jlab/io/evio/EvioDataEventHandler.java +++ b/common-tools/clas-io/src/main/java/org/jlab/io/evio/EvioDataEventHandler.java @@ -54,7 +54,7 @@ public EvioDataEventHandler(ByteBuffer buff){ try { structure = new EvioCompactStructureHandler(evioBuffer,DataType.BANK); eventNodes = structure.getChildNodes(); - } catch (EvioException ex) { + } catch (EvioException | IndexOutOfBoundsException | NullPointerException ex) { Logger.getLogger(EvioDataEvent.class.getName()).log(Level.SEVERE, null, ex); } //this.list();