From d5d305193ce527f1cc3022c406de35d9a85d4ccb Mon Sep 17 00:00:00 2001 From: hrxi Date: Sun, 1 Sep 2019 18:18:25 +0200 Subject: Fix some warnings Instances of `RegexError` are just asserted as `assert_not_reached` as they cannot really fail except for allocation failure if the given regex is valid. --- main/src/ui/notifications.vala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'main/src/ui/notifications.vala') diff --git a/main/src/ui/notifications.vala b/main/src/ui/notifications.vala index b8792bee..e495e629 100644 --- a/main/src/ui/notifications.vala +++ b/main/src/ui/notifications.vala @@ -125,8 +125,10 @@ public class Notifications : Object { string body = _("%s invited you to %s").printf(display_name, display_room); notification.set_body(body); - Cairo.ImageSurface jid_avatar = yield (new AvatarGenerator(40, 40)).draw_jid(stream_interactor, from_jid, account); - notification.set_icon(get_pixbuf_icon(jid_avatar)); + try { + Cairo.ImageSurface jid_avatar = yield (new AvatarGenerator(40, 40)).draw_jid(stream_interactor, from_jid, account); + notification.set_icon(get_pixbuf_icon(jid_avatar)); + } catch (Error e) { } Conversation conversation = stream_interactor.get_module(ConversationManager.IDENTITY).create_conversation(room_jid, account, Conversation.Type.GROUPCHAT); notification.set_default_action_and_target_value("app.open-muc-join", new Variant.int32(conversation.id)); -- cgit v1.2.3-70-g09d2