зеркало из https://github.com/microsoft/winsdkfb.git
LoginAsync will return an FBResult instead of a nullptr
This commit is contained in:
Родитель
1197fb4e8d
Коммит
03efdf31a5
|
@ -235,7 +235,7 @@ void MainPage::login_OnClicked(
|
|||
TryRerequest(FALSE);
|
||||
}));
|
||||
}
|
||||
else if (result != nullptr && result->Succeeded)
|
||||
else if (result->Succeeded)
|
||||
{
|
||||
// Got a token and all our permissions.
|
||||
NavigateToOptionsPage();
|
||||
|
|
|
@ -1085,6 +1085,13 @@ IAsyncOperation<FBResult^>^ FBSession::LoginAsync(
|
|||
_loggedIn = false;
|
||||
AccessTokenData = nullptr;
|
||||
}
|
||||
if (finalResult == nullptr)
|
||||
{
|
||||
finalResult = ref new FBResult(ref new FBError(0, L"Unexpected error", L"Log in attempt failed"));
|
||||
#ifdef DEBUG
|
||||
OutputDebugString(L"LoginAsync was about to return nullptr, created FBResult object to return instead");
|
||||
#endif
|
||||
}
|
||||
|
||||
return finalResult;
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче