Skip to content

Commit

Permalink
Fixes a stack overflow error in reading gama (agent) attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisDrogoul committed Aug 17, 2021
1 parent 95689dc commit b8cfde4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion msi.gama.core/src/msi/gaml/variables/Variable.java
Expand Up @@ -655,7 +655,7 @@ public Object value(final IScope scope, final IAgent agent) throws GamaRuntimeEx
if (functionExpression != null) return scope.evaluate(functionExpression, agent).getValue();
// Var not yet initialized. May happen when asking for its value while initializing an editor
// See Issue #2781
if (!agent.hasAttribute(name) && isNotModifiable) return getInitialValue(scope);
if (!agent.hasAttribute(name) && isNotModifiable && !description.isBuiltIn()) return getInitialValue(scope);
return agent.getAttribute(name);
}

Expand Down

0 comments on commit b8cfde4

Please sign in to comment.