aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index 46da0b67..e601d9b9 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -1289,9 +1289,11 @@ public class XmppConnectionService extends Service {
public Contact findContact(String uuid) {
Contact contact = this.databaseBackend.getContact(uuid);
- for (Account account : getAccounts()) {
- if (contact.getAccountUuid().equals(account.getUuid())) {
- contact.setAccount(account);
+ if (contact!=null) {
+ for (Account account : getAccounts()) {
+ if (contact.getAccountUuid().equals(account.getUuid())) {
+ contact.setAccount(account);
+ }
}
}
return contact;