diff --git a/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp b/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp index 7d152ac..a3ee695 100644 --- a/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp +++ b/Source/the_twilight_abyss/MerchantInteraction/Interaction.cpp @@ -25,8 +25,8 @@ void AInteraction::BeginPlay() Super::BeginPlay(); //Character & Camera refs - TempCharacterRef = Cast(GetWorld()->GetFirstPlayerController()->GetCharacter()); - MainCamera = Cast(TempCharacterRef->FindComponentByClass()); + if (TempCharacterRef != nullptr) TempCharacterRef = Cast(GetWorld()->GetFirstPlayerController()->GetCharacter()); + if (MainCamera != nullptr) MainCamera = Cast(TempCharacterRef->FindComponentByClass()); //Item refs TargetHealingLocation = HealingItem->GetActorLocation();