Commit b2f5636c authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+fix NPE when referenced component in a gate reference does not exist


(scope resolution)

related to #BUG 25

Change-Id: Ic09cd52af2fe9385bc6ed29dfa13e29d7e08bb6f
Signed-off-by: Philip Makedonski's avatarmakedonski <makedonski@informatik.uni-goettingen.de>
parent 793b723e
......@@ -44,8 +44,10 @@ public class TPLan2ScopeProvider extends AbstractDeclarativeScopeProvider {
if (reference.getEType().getInstanceClass() == GateInstance.class) {
if (context instanceof GateReference) {
GateReference gate = (GateReference) context;
IScope scope = Scopes.scopeFor(gate.getComponent().getType().getGateInstance());
return scope;
if (gate.getComponent().getType()!=null) {
IScope scope = Scopes.scopeFor(gate.getComponent().getType().getGateInstance());
return scope;
}
}
} else if (Parameter.class.isAssignableFrom(reference.getEType().getInstanceClass())) {
if (context instanceof MemberAssignment) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment