summaryrefslogtreecommitdiff
path: root/src/fe-text
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-04-20 17:35:29 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-04-20 17:35:29 +0000
commitcb4ce9f1b2ac599b1d12595ed4085023766a1f17 (patch)
tree4a9ec778c48d01ca58f0baffd923deeae30df960 /src/fe-text
parent7acb8fa02779c606f9105d520335e61a8b9b73eb (diff)
downloadirssi-cb4ce9f1b2ac599b1d12595ed4085023766a1f17.zip
potential crash fix..
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1451 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text')
-rw-r--r--src/fe-text/textbuffer-view.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fe-text/textbuffer-view.c b/src/fe-text/textbuffer-view.c
index b2388075..2739461b 100644
--- a/src/fe-text/textbuffer-view.c
+++ b/src/fe-text/textbuffer-view.c
@@ -845,7 +845,8 @@ static void view_bookmarks_check(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line)
if (rec.remove_list != NULL) {
GList *pos = g_list_find(view->buffer->lines, line);
- newline = pos->prev == NULL ? NULL : pos->next->data;
+ newline = pos == NULL || pos->prev == NULL ? NULL :
+ pos->next->data;
for (tmp = rec.remove_list; tmp != NULL; tmp = tmp->next) {
g_hash_table_remove(view->bookmarks, tmp->data);
if (newline != NULL) {