Skip to content

Commit

Permalink
Defend POGState addOperation against nulls
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbattle committed Oct 26, 2024
1 parent 5005284 commit bc9e5bd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vdmj/src/main/java/com/fujitsu/vdmj/pog/POGState.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ public void addDclLocal(TCNameToken name)

public void addOperation(LexLocation location, PODefinition called)
{
if (called.accessSpecifier.isPure)
if (called == null)
{
didUpdateState(location); // Assumed
}
else if (called.accessSpecifier.isPure)
{
return; // No updates, by definition
}
Expand Down

0 comments on commit bc9e5bd

Please sign in to comment.