X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Futil%2FRuntimeEnvironmentRequest2.java;fp=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Futil%2FRuntimeEnvironmentRequest2.java;h=c51428f2f8087758621d9396e6d6bad5f3cbd138;hb=05e139afecb430ed0c2e70e264f5a9a38a220c19;hp=ca8bc07cd53ab9a3b73d05a02e73d7473ae7db2a;hpb=4aa15c31ccd0d91cfdfbc9d63eca79e9045cc337;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/RuntimeEnvironmentRequest2.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/RuntimeEnvironmentRequest2.java index ca8bc07cd..c51428f2f 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/RuntimeEnvironmentRequest2.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/RuntimeEnvironmentRequest2.java @@ -113,9 +113,14 @@ public class RuntimeEnvironmentRequest2 extends BinaryRead sclModules = graph.syncRequest(new ObjectsWithType(parameter, L0.ConsistsOf, L0.SCLModule)); - for (Resource sclModule : sclModules) - environmentSpecification.importModule(graph.getURI(sclModule), ""); + if (parameter != null) { + Collection sclModules = graph.syncRequest(new ObjectsWithType(parameter, L0.ConsistsOf, L0.SCLModule)); + for (Resource sclModule : sclModules) { + environmentSpecification.importModule(graph.getURI(sclModule), ""); + } + } else { + // `parameter` is optional and can be null for e.g. procedural user components + } Resource mainModule = Layer0Utils.getPossibleChild(graph, parameter2, "SCLMain"); if(mainModule != null)