From cb4ce9f1b2ac599b1d12595ed4085023766a1f17 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 20 Apr 2001 17:35:29 +0000 Subject: [PATCH] potential crash fix.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1451 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/textbuffer-view.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {