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
This commit is contained in:
mordentral
2017-03-23 15:51:51 -04:00
parent af9bed57e7
commit edaec9f64c

View File

@@ -53,7 +53,8 @@ void UGetFriendsCallbackProxy::OnReadFriendsListCompleted(int32 LocalUserNum, bo
IOnlineFriendsPtr Friends = Online::GetFriendsInterface();
if (Friends.IsValid())
{
ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerControllerWeakPtr->Player);
// Not actually needed anymore, plus was not being validated and causing a crash
//ULocalPlayer* Player = Cast<ULocalPlayer>(PlayerControllerWeakPtr->Player);
TArray<FBPFriendInfo> FriendsListOut;
TArray< TSharedRef<FOnlineFriend> > FriendList;