Skip to content

Commit

Permalink
fix: crash when intent is null
Browse files Browse the repository at this point in the history
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
    net.openid.appauth.Preconditions.checkNotNull(Preconditions.java:39)
    net.openid.appauth.AuthorizationException.fromIntent(AuthorizationException.java:572)
    ly.david.musicsearch.data.musicbrainz.auth.MusicBrainzLoginActivityResultContract.parseResult(MusicBrainzLoginActivityResultContract.kt:60)
  • Loading branch information
lydavid committed Sep 12, 2024
1 parent 3d5cdf9 commit 805a329
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class MusicBrainzLoginActivityResultContract(
intent: Intent?,
): Result {
val response = intent?.run { AuthorizationResponse.fromIntent(intent) }
val exception = AuthorizationException.fromIntent(intent)
val exception = intent?.run { AuthorizationException.fromIntent(intent) }
return Result(
response = response,
exception = exception,
Expand Down

0 comments on commit 805a329

Please sign in to comment.