From 44e8128ac39960e863368b235e81a44303a94633 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Wed, 20 Jun 2018 17:23:38 +0300 Subject: [PATCH] Added exception safety for createHistorySamplerItem2 gitlab #9 Change-Id: I2a5894b73a638aad3e05ee42d0b10e40d60f3270 --- .../org.simantics.charts/src/org/simantics/charts/Charts.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.simantics.charts/src/org/simantics/charts/Charts.java b/bundles/org.simantics.charts/src/org/simantics/charts/Charts.java index c7dee69b0..230e905e4 100644 --- a/bundles/org.simantics.charts/src/org/simantics/charts/Charts.java +++ b/bundles/org.simantics.charts/src/org/simantics/charts/Charts.java @@ -83,7 +83,7 @@ public final class Charts { IExperiment exp = (IExperiment) run.getPropertyValue(graph, "iExperiment"); ITrendSupport support = exp.getService(ITrendSupport.class); ChartData data = support.getChartData(); - return createHistorySamplerItem2(graph, subscriptionItem, data); + return data != null ? createHistorySamplerItem2(graph, subscriptionItem, data) : null; } public static HistorySamplerItem2 createHistorySamplerItem2(ReadGraph graph, Resource subscriptionItem, ChartData data) throws DatabaseException { -- 2.47.1