aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-06-16 15:17:08 +0200
committerfiaxh <git@lightrise.org>2019-06-22 00:56:50 +0200
commitfa43581ad3a72023377a216e6a93afc4fc473d38 (patch)
tree8741a11b581af0bebebf942f714707d190058159
parent24f525628bd58c09f2dd6d32f625a413bef2a27e (diff)
downloaddino-fa43581ad3a72023377a216e6a93afc4fc473d38.tar.gz
dino-fa43581ad3a72023377a216e6a93afc4fc473d38.zip
Fix runtime criticals
-rw-r--r--libdino/src/service/conversation_manager.vala8
-rw-r--r--main/src/ui/conversation_summary/conversation_item_skeleton.vala2
2 files changed, 6 insertions, 4 deletions
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;
+ }
}
}
diff --git a/main/src/ui/conversation_summary/conversation_item_skeleton.vala b/main/src/ui/conversation_summary/conversation_item_skeleton.vala
index 808bcf7a..ad12dd85 100644
--- a/main/src/ui/conversation_summary/conversation_item_skeleton.vala
+++ b/main/src/ui/conversation_summary/conversation_item_skeleton.vala
@@ -46,8 +46,8 @@ public class ConversationItemSkeleton : EventBox {
default_header.add_item(item);
}
Widget? widget = item.get_widget(Plugins.WidgetType.GTK) as Widget;
- widget.valign = Align.END;
if (widget != null) {
+ widget.valign = Align.END;
header_content_box.add(widget);
}