From d0bb4b3f530a006d0192ab0a167f7d44d3ad9241 Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Sat, 20 May 2006 19:06:16 +0000 Subject: [PATCH] prevent TB --- src/conversation_textview.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/conversation_textview.py b/src/conversation_textview.py index a60495622..50c20d55f 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -159,7 +159,10 @@ class ConversationTextview: def scroll_to_end(self): parent = self.tv.get_parent() buffer = self.tv.get_buffer() - self.tv.scroll_to_mark(buffer.get_mark('end'), 0, True, 0, 1) + end_mark = buffer.get_mark('end') + if not end_mark: + return False + self.tv.scroll_to_mark(end_mark, 0, True, 0, 1) adjustment = parent.get_hadjustment() adjustment.set_value(0) return False # when called in an idle_add, just do it once