From 49a8778975ce0ce8136f8789f2ea75d59d616e22 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 5 May 2023 13:26:55 -0400 Subject: [PATCH] BugFix for NPE on null ZappedNote --- app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt b/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt index ddacd9993..81623a192 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt @@ -191,8 +191,8 @@ class Account( ) } - fun calculateIfNoteWasZappedByAccount(zappedNote: Note): Boolean { - return zappedNote.isZappedBy(userProfile(), this) == true + fun calculateIfNoteWasZappedByAccount(zappedNote: Note?): Boolean { + return zappedNote?.isZappedBy(userProfile(), this) == true } fun calculateZappedAmount(zappedNote: Note?): BigDecimal {