diff --git a/WebApp/src/uk/ac/exeter/QuinCe/web/datasets/SensorOffsets/TimeSeriesPlotData.java b/WebApp/src/uk/ac/exeter/QuinCe/web/datasets/SensorOffsets/TimeSeriesPlotData.java index 8a57436a2..a7545ad3c 100644 --- a/WebApp/src/uk/ac/exeter/QuinCe/web/datasets/SensorOffsets/TimeSeriesPlotData.java +++ b/WebApp/src/uk/ac/exeter/QuinCe/web/datasets/SensorOffsets/TimeSeriesPlotData.java @@ -122,11 +122,13 @@ protected String getArray(SensorOffsets sensorOffsets, } protected Double getFirstSeriesValue(LocalDateTime time) { - return data.get(time).getFirst(); + Tuple tuple = data.get(time); + return null == tuple ? Double.NaN : tuple.getFirst(); } protected Double getSecondSeriesValue(LocalDateTime time) { - return data.get(time).getSecond(); + Tuple tuple = data.get(time); + return null == tuple ? Double.NaN : tuple.getSecond(); } /**