From d804cdc3bdc26084a406b4f79a0e1aa509fcec0b Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Tue, 12 Jul 2022 17:43:51 +0300 Subject: [PATCH] fix: Accessed None 'CurrentPerk' (ExtPlayerController:CheckPerk) ScriptWarning: Accessed None 'CurrentPerk' 011ExtPlayerController KF-Crazy_Playboy_Edited.TheWorld:PersistentLevel.ExtPlayerController_1 011Function ServerExt.ExtPlayerController:CheckPerk:00B3 --- ServerExt/Classes/ExtPlayerController.uc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ServerExt/Classes/ExtPlayerController.uc b/ServerExt/Classes/ExtPlayerController.uc index 7a3c9de..3d49d5e 100644 --- a/ServerExt/Classes/ExtPlayerController.uc +++ b/ServerExt/Classes/ExtPlayerController.uc @@ -91,13 +91,16 @@ simulated function Destroyed() function CheckPerk() { - if (CurrentPerk!=ActivePerkManager) + if (CurrentPerk != ActivePerkManager) { CurrentPerk = ActivePerkManager; if (KFPlayerReplicationInfo(PlayerReplicationInfo)!=None) { KFPlayerReplicationInfo(PlayerReplicationInfo).NetPerkIndex = 0; - KFPlayerReplicationInfo(PlayerReplicationInfo).CurrentPerkClass = ActivePerkManager.CurrentPerk.BasePerk; + if (ActivePerkManager.CurrentPerk != None) + { + KFPlayerReplicationInfo(PlayerReplicationInfo).CurrentPerkClass = ActivePerkManager.CurrentPerk.BasePerk; + } } } }