Added exception safety for createHistorySamplerItem2 69/1869/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 20 Jun 2018 14:23:38 +0000 (17:23 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 20 Jun 2018 14:23:38 +0000 (17:23 +0300)
gitlab #9

Change-Id: I2a5894b73a638aad3e05ee42d0b10e40d60f3270

bundles/org.simantics.charts/src/org/simantics/charts/Charts.java

index c7dee69b0834b463963c4a3ccdd92b1fe1649bc9..230e905e441f70e8b031220ee35b0f929ffc76a2 100644 (file)
@@ -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 {