Unreal Engine crashes if using GetAcceptableActor() directly

When checking if we got an acceptable actor I inadvertently bypassed a step and simply wrote

if (GetAcceptableActor() != nullptr) {
Mover->SetShouldMove(true)
}

As opposed to first creating a new pointer:
AActor* Actor = GetAcceptableActor();
and using that to check if its a nullptr

This ended up crashing unreal until I was able to figure out where my code differed, but I’m curious why this is? As I read through the code I see GetAcceptableActor() returning AActor* Actor, but clearly this is not what is actually being returned

I think there’s more to this, if you revert back to what you had do you still crash? If so with what crash report?

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms