# HG changeset patch # User Sadrul Habib Chowdhury # Date 1255024985 0 # Node ID fe49bedd5aee2ad1ddf81844c2124a2cce5ebccb # Parent 65e8c39cc5f641e2e2db0d9dcc8634d37bbb83a2 Nullify the freed pointer so it's not accessed later. diff -r 65e8c39cc5f6 -r fe49bedd5aee finch/libgnt/gnttextview.c --- a/finch/libgnt/gnttextview.c Thu Oct 08 17:41:41 2009 +0000 +++ b/finch/libgnt/gnttextview.c Thu Oct 08 18:03:05 2009 +0000 @@ -767,6 +767,7 @@ line->segments = g_list_delete_link(line->segments, segs); if (line->segments == NULL) { free_text_line(line, NULL); + line = NULL; if (view->list == iter) { if (inext) view->list = inext; @@ -780,7 +781,8 @@ seg->start = tag->start; seg->end = tag->end - change; } - line->length -= change; + if (line) + line->length -= change; /* XXX: Make things work if the tagged text spans over several lines. */ } else { /* XXX: handle the rest of the conditions */