Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2013-11-25 08:41:42 +0000
committerHenrik Rentz-Reichert2013-11-25 08:41:42 +0000
commit2207283a15d7f4a30ac820b41f3d14961d0c0b87 (patch)
tree9762fc71c0027f6ae33c1f0d9082aea3acdb06c0 /plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend
parent475da5253481df1a63b0ebf52071729c2bd86881 (diff)
downloadorg.eclipse.etrice-2207283a15d7f4a30ac820b41f3d14961d0c0b87.tar.gz
org.eclipse.etrice-2207283a15d7f4a30ac820b41f3d14961d0c0b87.tar.xz
org.eclipse.etrice-2207283a15d7f4a30ac820b41f3d14961d0c0b87.zip
Bug 422442: [generator.c] generator crashes with NPE if generated as library but contains LogicalSystem and SubSystem
https://bugs.eclipse.org/422442
Diffstat (limited to 'plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend')
-rw-r--r--plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend
index d6c4a04b3..d162810c5 100644
--- a/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend
+++ b/plugins/org.eclipse.etrice.generator.c/src/org/eclipse/etrice/generator/c/gen/NodeRunnerGen.xtend
@@ -33,10 +33,12 @@ class NodeRunnerGen {
for (nr : ETMapUtil::getNodeRefs()) {
for (instpath : ETMapUtil::getSubSystemInstancePaths(nr)) {
val ssi = root.getInstance(instpath) as SubSystemInstance
- val clsname = nr.name+"_"+ssi.name
- fileAccess.setOutputPath(ssi.subSystemClass.generationTargetPath+ssi.subSystemClass.getPath)
- fileAccess.generateFile( clsname+"_Runner.c", root.generateSourceFile(ssi, first))
- first = false
+ if (ssi!=null) {
+ val clsname = nr.name+"_"+ssi.name
+ fileAccess.setOutputPath(ssi.subSystemClass.generationTargetPath+ssi.subSystemClass.getPath)
+ fileAccess.generateFile( clsname+"_Runner.c", root.generateSourceFile(ssi, first))
+ first = false
+ }
}
}
}

Back to the top