diff --git a/EndlessVendetta/Source/EndlessVendetta/DialogueSystem/AC_PlayerDialogueInterpreter.cpp b/EndlessVendetta/Source/EndlessVendetta/DialogueSystem/AC_PlayerDialogueInterpreter.cpp index 53d88cf3..25145c42 100644 --- a/EndlessVendetta/Source/EndlessVendetta/DialogueSystem/AC_PlayerDialogueInterpreter.cpp +++ b/EndlessVendetta/Source/EndlessVendetta/DialogueSystem/AC_PlayerDialogueInterpreter.cpp @@ -76,7 +76,7 @@ void UAC_PlayerDialogueInterpreter::NextDialogue() if (IsValid(CurrentChoiceNode)) return; if (IsValid(CurrentTextNode)) { - CurrentVoiceOverAudioComponent->Stop(); + if (IsValid(CurrentVoiceOverAudioComponent)) CurrentVoiceOverAudioComponent->Stop(); if (CurrentTextNode->ChildrenNodes.Num() == 0) { EndDialogue(); @@ -142,7 +142,7 @@ void UAC_PlayerDialogueInterpreter::NextDialogue() void UAC_PlayerDialogueInterpreter::MakeChoiceDialogue(const int Choice) { if (!IsValid(CurrentChoiceNode)) return; - CurrentVoiceOverAudioComponent->Stop(); + if (IsValid(CurrentVoiceOverAudioComponent)) CurrentVoiceOverAudioComponent->Stop(); if (Cast(CurrentChoiceNode->ChildrenNodes[Choice])) { CurrentChoiceNode = Cast(CurrentChoiceNode->ChildrenNodes[Choice]); @@ -172,7 +172,7 @@ void UAC_PlayerDialogueInterpreter::EndDialogue() CurrentTextNode = nullptr; CurrentAddItemNode = nullptr; CurrentCharacterSpeaking = FDialogueCharacter(); - CurrentVoiceOverAudioComponent->Stop(); + if (IsValid(CurrentVoiceOverAudioComponent)) CurrentVoiceOverAudioComponent->Stop(); CurrentVoiceOverAudioComponent = nullptr; if (APlayerController* PlayerController = GetWorld()->GetFirstPlayerController())