From c60c8e998fd0c8d0170d9f943f7eba1a2245a321 Mon Sep 17 00:00:00 2001 From: AsamK Date: Mon, 8 Nov 2021 21:06:27 +0100 Subject: [PATCH] Fix ACI null pointer --- .../java/org/asamk/signal/manager/storage/SignalAccount.java | 2 +- .../asamk/signal/manager/storage/recipients/RecipientStore.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java b/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java index e84028cf..1f6b3d87 100644 --- a/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java +++ b/lib/src/main/java/org/asamk/signal/manager/storage/SignalAccount.java @@ -845,7 +845,7 @@ public class SignalAccount implements Closeable { } public RecipientId getSelfRecipientId() { - return recipientStore.resolveRecipientTrusted(new RecipientAddress(aci.uuid(), username)); + return recipientStore.resolveRecipientTrusted(new RecipientAddress(aci == null ? null : aci.uuid(), username)); } public String getEncryptedDeviceName() { diff --git a/lib/src/main/java/org/asamk/signal/manager/storage/recipients/RecipientStore.java b/lib/src/main/java/org/asamk/signal/manager/storage/recipients/RecipientStore.java index 26a43423..2f07bd2e 100644 --- a/lib/src/main/java/org/asamk/signal/manager/storage/recipients/RecipientStore.java +++ b/lib/src/main/java/org/asamk/signal/manager/storage/recipients/RecipientStore.java @@ -139,7 +139,7 @@ public class RecipientStore implements RecipientResolver, ContactsStore, Profile @Override public RecipientId resolveRecipient(ACI aci) { - return resolveRecipient(new RecipientAddress(aci.uuid()), false); + return resolveRecipient(new RecipientAddress(aci == null ? null : aci.uuid()), false); } @Override