From: Tuukka Lehtonen Date: Wed, 20 Jun 2018 14:23:38 +0000 (+0300) Subject: Added exception safety for createHistorySamplerItem2 X-Git-Tag: v1.43.0~136^2~455 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=44e8128ac39960e863368b235e81a44303a94633;p=simantics%2Fplatform.git Added exception safety for createHistorySamplerItem2 gitlab #9 Change-Id: I2a5894b73a638aad3e05ee42d0b10e40d60f3270 --- 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 {