diff --git a/gajim/conversation_textview.py b/gajim/conversation_textview.py index 42f8492d6..c738fb442 100644 --- a/gajim/conversation_textview.py +++ b/gajim/conversation_textview.py @@ -953,17 +953,17 @@ class ConversationTextview(GObject.GObject): end_iter = iter_ else: end_iter = buffer_.get_end_iter() - if gajim.config.get('emoticons_theme') and graphics: - pixbuf = emoticons.get_pixbuf(possible_emot_ascii_caps) - if pixbuf: - # it's an emoticon - anchor = buffer_.create_child_anchor(end_iter) - img = TextViewImage(anchor, - GLib.markup_escape_text(special_text)) - img.set_from_pixbuf(pixbuf) - img.show() - self.images.append(img) - self.tv.add_child_at_anchor(img, anchor) + + pixbuf = emoticons.get_pixbuf(possible_emot_ascii_caps) + if gajim.config.get('emoticons_theme') and pixbuf and graphics: + # it's an emoticon + anchor = buffer_.create_child_anchor(end_iter) + img = TextViewImage(anchor, + GLib.markup_escape_text(special_text)) + img.set_from_pixbuf(pixbuf) + img.show() + self.images.append(img) + self.tv.add_child_at_anchor(img, anchor) elif special_text.startswith('www.') or \ special_text.startswith('ftp.') or \ text_is_valid_uri and not is_xhtml_link: