playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.47k stars 966 forks source link

NULL Exception set #3202

Open Beowulfe222 opened 1 year ago

Beowulfe222 commented 1 year ago

https://github.com/playgameservices/play-games-plugin-for-unity/blob/d3073e3948309e23e68e39b41e919cd7f7bcf77d/Assets/Public/GooglePlayGames/com.google.play.games/Runtime/Scripts/ISocialPlatform/PlayGamesUserProfile.cs#L210

When setAvatarUrl is called with a NULL value (happening by default on our leaderboard, no custom calls from our end), this line throws a NULL exception error (which causes other cascading issues). It should check if avatarUrl is NULL before attempting to call avatarUrl.StartsWith().

EmirUgur commented 1 year ago

Getting the same error while calling Social.LoadScores function. It's working fine if the user enters the native Play Games leaderboard menu before this function gets called.