From e5c7dea51cc174be406fcc67d40d1955471e9be0 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 23 Jun 2006 14:00:37 -0400 Subject: [PATCH] Don't traceback when an icon isn't found --- sugar/chat/richtext.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sugar/chat/richtext.py b/sugar/chat/richtext.py index 688b41a3..08a5f443 100644 --- a/sugar/chat/richtext.py +++ b/sugar/chat/richtext.py @@ -90,8 +90,11 @@ class RichTextBuffer(gtk.TextBuffer): self.insert_with_tags_by_name(it, name, "icon", "object-id") icon_theme = gtk.icon_theme_get_default() - pixbuf = icon_theme.load_icon(name, 16, 0) - self.insert_pixbuf(it, pixbuf) + try: + pixbuf = icon_theme.load_icon(name, 16, 0) + self.insert_pixbuf(it, pixbuf) + except gobject.GError: + pass def apply_tag(self, tag_name): self.active_tags.append(tag_name)