Skip to content

Commit eae2bc0

Browse files
Fix potential NullPointerException in FileState.
If you accessed `file.Url` without being saved yet, you would crash. Very bad.
1 parent 1e1117b commit eae2bc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Parse/Internal/File/State/FileState.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ internal class FileState {
1313
public Uri SecureUrl {
1414
get {
1515
Uri uri = Url;
16-
if (uri.Host == ParseFileSecureDomain) {
16+
if (uri != null && uri.Host == ParseFileSecureDomain) {
1717
return new UriBuilder(uri) {
1818
Scheme = ParseFileSecureScheme,
1919
Port = -1, // This makes URIBuilder assign the default port for the URL scheme.

0 commit comments

Comments
 (0)