From bc9e5bda4ab29abf519bae7713cd79bb19128aa3 Mon Sep 17 00:00:00 2001 From: Nick Battle Date: Sat, 26 Oct 2024 16:57:29 +0100 Subject: [PATCH] Defend POGState addOperation against nulls --- vdmj/src/main/java/com/fujitsu/vdmj/pog/POGState.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vdmj/src/main/java/com/fujitsu/vdmj/pog/POGState.java b/vdmj/src/main/java/com/fujitsu/vdmj/pog/POGState.java index 3118a85d0..3a2e30758 100644 --- a/vdmj/src/main/java/com/fujitsu/vdmj/pog/POGState.java +++ b/vdmj/src/main/java/com/fujitsu/vdmj/pog/POGState.java @@ -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 }