Passed pointer to another component arrives as nullptr

Ok, now it gets slightly esoteric.

I have two components… one is called “Interactable” the other one “Interactor”.
Both derive from SphereComponent.

I check collision between those two and if collision is found I call the “Select” function of the Interactable class.

void UInteractorComponent::OverlapBegin_Func(UPrimitiveComponent* OverlappedComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
	UInteractableComponent* Component = Cast<UInteractableComponent>(OtherComp);

	if (CurrentInteractable != Component)
	{
		UInteractorComponent* Myself = this;

		if (Myself == nullptr)
			UE_LOG(HugLogs, Error, TEXT("UInteractorComponent::OverlapBegin_Func -> this == NULL"));

		CurrentInteractable = Component;

		CurrentInteractable->Select(Myself);
	}
}

Now, this is the other side:

void UInteractableComponent::Select(UInteractorComponent* Source)
{
	if (Source == nullptr)
		UE_LOG(HugLogs, Error, TEXT("UInteractableComponent::Select -> Source == NULL"));

	IsSelected = true;

	OnSelected.Broadcast(Source);
}

And now the riddle. WHY on earth is this is the output:

HugLogs:Error: UInteractableComponent::Select -> Source == NULL
HugLogs:Error: UInteractableComponent::Select -> Source == NULL
HugLogs:Error: UInteractableComponent::Select -> Source == NULL
HugLogs:Error: UInteractableComponent::Select -> Source == NULL

The THIS pointer I pass is definitely not NULL. The debug message there is never printed.
But the pointer that arrives at the called function is definitely NULL.

What happens to that pointer while it travels through Unreal? Why does it get deleted? And how?

Before you say it: Nothing else is calling that select function. This is the only code that calls select and I actually checked with a debug log that it is happening.

I need help. :stuck_out_tongue:

Whatever it was, a complete deletion of Intermediate/Saved/Binary and project regeneration fixed it.