Skip to content

Commit e9c923b

Browse files
author
Ingrid Fielker
committed
Prevent trying to create Uris from empty string.
This allows the GoogleSignInPlugin to work for Games sign in. Change-Id: Id0fb740292c08542ce960ddebc8b4496b9225117
1 parent 19a890d commit e9c923b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

GoogleSignInPlugin/Assets/GoogleSignIn/Impl/NativeFuture.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ public GoogleSignInUser Result {
7272
string url = OutParamsToString((out_string, out_size) =>
7373
GoogleSignInImpl.GoogleSignIn_GetImageUrl(userPtr, out_string,
7474
out_size));
75-
user.ImageUrl = new System.Uri(url);
75+
if (url.Length > 0) {
76+
user.ImageUrl = new System.Uri(url);
77+
}
7678

7779
user.UserId = OutParamsToString((out_string, out_size) =>
7880
GoogleSignInImpl.GoogleSignIn_GetUserId(userPtr, out_string,
@@ -97,4 +99,4 @@ public GoogleSignInStatusCode Status {
9799
}
98100
}
99101
}
100-
}
102+
}

0 commit comments

Comments
 (0)