Skip to content

Commit

Permalink
Merge pull request playgameservices#1156 from JamesMcMahon/patch-1
Browse files Browse the repository at this point in the history
Fix NullReferenceException on null callback
  • Loading branch information
claywilkinson committed May 17, 2016
2 parents dfa4972 + e80c965 commit ff9782f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,10 @@ public void ShowLeaderboardUI(
if (!IsAuthenticated())
{
GooglePlayGames.OurUtils.Logger.e("ShowLeaderboardUI can only be called after authentication.");
callback(UIStatus.NotAuthorized);
if (callback != null)
{
callback(UIStatus.NotAuthorized);
}
return;
}

Expand Down

0 comments on commit ff9782f

Please sign in to comment.