Skip to content

Commit

Permalink
Another null check
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikl committed Jul 3, 2018
1 parent 184b7f0 commit 9b70ff3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions components/blitz/src/omero/gateway/model/ROIData.java
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,12 @@ public ROICoordinate lastPlane() {
public Iterator<List<ShapeData>> getShapesInRange(ROICoordinate start,
ROICoordinate end) {
List<List<ShapeData>> res = new ArrayList<List<ShapeData>>();
res.addAll(roiShapes.subMap(start, end).values());
res.add(roiShapes.get(new ROICoordinate(-1, -1)));
Collection<List<ShapeData>> inRange = roiShapes.subMap(start, end).values();
if (inRange != null)
res.addAll(inRange);
List<ShapeData> allRanges = roiShapes.get(new ROICoordinate(-1, -1));
if (allRanges != null)
res.add(allRanges);
return res.iterator();
}

Expand Down

0 comments on commit 9b70ff3

Please sign in to comment.