From fa43581ad3a72023377a216e6a93afc4fc473d38 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 16 Jun 2019 15:17:08 +0200 Subject: Fix runtime criticals --- libdino/src/service/conversation_manager.vala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libdino') diff --git a/libdino/src/service/conversation_manager.vala b/libdino/src/service/conversation_manager.vala index b1e8d8a8..039bad53 100644 --- a/libdino/src/service/conversation_manager.vala +++ b/libdino/src/service/conversation_manager.vala @@ -35,9 +35,11 @@ public class ConversationManager : StreamInteractionModule, Object { Jid store_jid = type == Conversation.Type.GROUPCHAT ? jid.bare_jid : jid; // Do we already have a conversation for this jid? - foreach (var conversation in conversations[account][store_jid]) { - if (conversation.type_ == type) { - return conversation; + if (conversations[account].has_key(store_jid)) { + foreach (var conversation in conversations[account][store_jid]) { + if (conversation.type_ == type) { + return conversation; + } } } -- cgit v1.2.3-70-g09d2