From 2da8fd688137a6bb847f9f003f18996833465cf3 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Fri, 18 Oct 2019 14:31:23 +0200 Subject: [PATCH] Fix critical warning in roster manager when account gets offline --- libdino/src/service/roster_manager.vala | 2 ++ 1 file changed, 2 insertions(+) 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 get_roster(Account account) { + if (roster_stores[account] == null) return new ArrayList(); 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); }