From 4a809146030e578de1871087108fcd3a276e5369 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Wed, 3 Dec 2014 00:18:07 +0100 Subject: [PATCH] fixed another npe in hasBookmark --- src/main/java/eu/siacs/conversations/entities/Account.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/entities/Account.java b/src/main/java/eu/siacs/conversations/entities/Account.java index 1d0a025f7..538d0ec2e 100644 --- a/src/main/java/eu/siacs/conversations/entities/Account.java +++ b/src/main/java/eu/siacs/conversations/entities/Account.java @@ -372,8 +372,9 @@ public class Account extends AbstractEntity { } public boolean hasBookmarkFor(final Jid conferenceJid) { - for (Bookmark bmark : this.bookmarks) { - if (bmark.getJid().equals(conferenceJid.toBareJid())) { + for (Bookmark bookmark : this.bookmarks) { + final Jid jid = bookmark.getJid(); + if (jid != null && jid.equals(conferenceJid.toBareJid())) { return true; } }