diff --git a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java index 0008ac1f0d..53b3cd62d1 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java +++ b/core/store/dist/src/main/java/org/onosproject/store/flow/impl/DeviceFlowTable.java @@ -761,7 +761,8 @@ public class DeviceFlowTable { * Handles an update to a term. */ private void updateTerm(DeviceReplicaInfo replicaInfo) { - if (replicaInfo.term() == this.replicaInfo.term()) { + DeviceReplicaInfo oldReplicaInfo = this.replicaInfo; + if (oldReplicaInfo != null && replicaInfo.term() == oldReplicaInfo.term()) { this.replicaInfo = replicaInfo; // If the local node is neither the master or a backup for the device *and the term is active*,