]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.charts/src/org/simantics/charts/Charts.java
Added exception safety for createHistorySamplerItem2
[simantics/platform.git] / 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 {