Trigger Volume code crashing on Play

Just following a tutorial on volume triggers, the game started crashing when I press play I narrowed it down to this if
statement in OpenDoor.cpp:

void UOpenDoor::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
{
	Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
	
	// Poll Door every frame, if actor enters trigger volume OpenDoor() 
	if (PressurePlate->IsOverlappingActor(ActorThatOpens))
		//THIS IF IS CAUSING THE CRASH[link text][1]
	{
	OpenDoor();
	}
}

OpenDoor.h for reference:

{
	GENERATED_BODY()

public:	
	// Sets default values for this component's properties
	UOpenDoor();

	UPROPERTY(EditAnywhere)
	class	ATriggerVolume *PressurePlate;

    UPROPERTY(EditAnywhere)
	class	 AACtor *ActorThatOpens;
	
	protected:
	// Called when the game starts
	virtual void BeginPlay() override;

	void OpenDoor();

public:	
	// Called every frame
	virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;


};

I just swapped PressurePlate with ActorThatOpens and it worked, still dont know why

1 Like

Thanks for the help. I had the same one.