From 9e99a8af9cff0c3aa417d7cb478818124a3f6f72 Mon Sep 17 00:00:00 2001 From: murat aka Date: Tue, 27 Sep 2022 05:22:41 +0300 Subject: [PATCH] fix : PossessedCharacter may be null . --- Source/ALSV4_CPP/Private/Character/ALSPlayerController.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/ALSV4_CPP/Private/Character/ALSPlayerController.cpp b/Source/ALSV4_CPP/Private/Character/ALSPlayerController.cpp index 7a8dd412..ce68c74c 100644 --- a/Source/ALSV4_CPP/Private/Character/ALSPlayerController.cpp +++ b/Source/ALSV4_CPP/Private/Character/ALSPlayerController.cpp @@ -41,6 +41,8 @@ void AALSPlayerController::OnRep_Pawn() PossessedCharacter = Cast(GetPawn()); SetupCamera(); SetupInputs(); + + if (!PossessedCharacter) return; UALSDebugComponent* DebugComp = Cast(PossessedCharacter->GetComponentByClass(UALSDebugComponent::StaticClass())); if (DebugComp)