X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Feos-dom-akka%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Feos%2Fakka%2Fregistry%2Flistener%2Ftype%2FEntityTypeListenerRegistry.java;h=a6183a8f1c3e403ce7171df671912f35dbf75611;hp=e4f7b48d04dcbb7334927902ef9519f719663ac5;hb=6481a3188fb6a6027f088aa4d2d8834007505ff7;hpb=1def87ee24e57b97bce49a61fbff03f13b7caf46 diff --git a/opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/listener/type/EntityTypeListenerRegistry.java b/opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/listener/type/EntityTypeListenerRegistry.java index e4f7b48d04..a6183a8f1c 100644 --- a/opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/listener/type/EntityTypeListenerRegistry.java +++ b/opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/listener/type/EntityTypeListenerRegistry.java @@ -66,7 +66,10 @@ public class EntityTypeListenerRegistry extends AbstractBehavior onUnregisterListener(final UnregisterListener command) { LOG.debug("Stopping entity type listener actor for: {}", command.getEntityType()); - spawnedListenerActors.remove(command.getDelegateListener()).tell(TerminateListener.INSTANCE); + final ActorRef actor = spawnedListenerActors.remove(command.getDelegateListener()); + if (actor != null) { + actor.tell(TerminateListener.INSTANCE); + } return this; }