diff --git a/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala b/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala index 01ea2873e72..26131a979cc 100644 --- a/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala +++ b/actor/src/main/scala/org/apache/pekko/actor/ActorCell.scala @@ -661,7 +661,7 @@ private[pekko] class ActorCell( Thread.currentThread().interrupt() throw ActorInitializationException(self, "interruption during creation", e) case NonFatal(e) => - if (actor != null) setFailed(actor.self) + if (actor ne null) setFailed(actor.self) failActor() e match { case i: InstantiationException =>