From edaec9f64c236a602946c6ddc600baf43f0c0a81 Mon Sep 17 00:00:00 2001 From: mordentral Date: Thu, 23 Mar 2017 15:51:51 -0400 Subject: [PATCH] Fixed a missing validity check in GetFriendsCallbackProxy If a player controller was removed between when the node was called and when it resolved it would crash. Other async nodes were checked and they were not missing a validation check. Former-commit-id: 971738d49efeb611978366be370060cae5d10dba --- .../AdvancedSessions/Private/GetFriendsCallbackProxy.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AdvancedSessions/Source/AdvancedSessions/Private/GetFriendsCallbackProxy.cpp b/AdvancedSessions/Source/AdvancedSessions/Private/GetFriendsCallbackProxy.cpp index 4457ffd..a335384 100644 --- a/AdvancedSessions/Source/AdvancedSessions/Private/GetFriendsCallbackProxy.cpp +++ b/AdvancedSessions/Source/AdvancedSessions/Private/GetFriendsCallbackProxy.cpp @@ -53,7 +53,8 @@ void UGetFriendsCallbackProxy::OnReadFriendsListCompleted(int32 LocalUserNum, bo IOnlineFriendsPtr Friends = Online::GetFriendsInterface(); if (Friends.IsValid()) { - ULocalPlayer* Player = Cast(PlayerControllerWeakPtr->Player); + // Not actually needed anymore, plus was not being validated and causing a crash + //ULocalPlayer* Player = Cast(PlayerControllerWeakPtr->Player); TArray FriendsListOut; TArray< TSharedRef > FriendList;