Maybe do a nullptr check on CachedActor before you try double de-referencing it?
(Can you even double de-reference in this case? Your TMap value is a single pointer. Once you pass in the string for find you already should have access to the actor’s pointer.)
You could also check if the key even exists in the map after that step.
if(ActorNameCache.Contains(Box->Name)){
}
Also do you do a nullptr check on Box anywhere?
I’m guessing you are getting a crash in the compound if statement.
Try splitting them up into separate tests with a break point and see where chaos ensues.