Fix runtime criticals

This commit is contained in:
fiaxh 2019-06-16 15:17:08 +02:00
parent 24f525628b
commit fa43581ad3
2 changed files with 6 additions and 4 deletions

View file

@ -35,9 +35,11 @@ public class ConversationManager : StreamInteractionModule, Object {
Jid store_jid = type == Conversation.Type.GROUPCHAT ? jid.bare_jid : jid; Jid store_jid = type == Conversation.Type.GROUPCHAT ? jid.bare_jid : jid;
// Do we already have a conversation for this jid? // Do we already have a conversation for this jid?
foreach (var conversation in conversations[account][store_jid]) { if (conversations[account].has_key(store_jid)) {
if (conversation.type_ == type) { foreach (var conversation in conversations[account][store_jid]) {
return conversation; if (conversation.type_ == type) {
return conversation;
}
} }
} }

View file

@ -46,8 +46,8 @@ public class ConversationItemSkeleton : EventBox {
default_header.add_item(item); default_header.add_item(item);
} }
Widget? widget = item.get_widget(Plugins.WidgetType.GTK) as Widget; Widget? widget = item.get_widget(Plugins.WidgetType.GTK) as Widget;
widget.valign = Align.END;
if (widget != null) { if (widget != null) {
widget.valign = Align.END;
header_content_box.add(widget); header_content_box.add(widget);
} }