aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-08 10:23:05 +0200
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-04-08 10:23:05 +0200
commit92dcf857014bfec919d62a7c0457093bd9056d94 (patch)
tree28ee358d80da6cb5d274e8fc6e9081953b878b00 /src
parent78bd6c423fa1a2b89322deb69a23b15ef3a72bcb (diff)
fixed npe
Diffstat (limited to '')
-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;