aboutsummaryrefslogtreecommitdiff
path: root/libdino/src
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2019-10-18 14:31:23 +0200
committerMarvin W <git@larma.de>2019-10-18 14:31:23 +0200
commit2da8fd688137a6bb847f9f003f18996833465cf3 (patch)
tree3f314271e423d16145d8d6c2134cbe43777b6638 /libdino/src
parent7d561ddfab88f676d2b49d8a7a7bc5dd30d1f41f (diff)
downloaddino-2da8fd688137a6bb847f9f003f18996833465cf3.tar.gz
dino-2da8fd688137a6bb847f9f003f18996833465cf3.zip
Fix critical warning in roster manager when account gets offline
Diffstat (limited to 'libdino/src')
-rw-r--r--libdino/src/service/roster_manager.vala2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdino/src/service/roster_manager.vala b/libdino/src/service/roster_manager.vala
index 5181b90e..6f004c01 100644
--- a/libdino/src/service/roster_manager.vala
+++ b/libdino/src/service/roster_manager.vala
@@ -33,10 +33,12 @@ public class RosterManager : StreamInteractionModule, Object {
}
public Collection<Roster.Item> get_roster(Account account) {
+ if (roster_stores[account] == null) return new ArrayList<Roster.Item>();
return roster_stores[account].get_roster();
}
public Roster.Item? get_roster_item(Account account, Jid jid) {
+ if (roster_stores[account] == null) return null;
return roster_stores[account].get_item(jid);
}