finch/libgnt/gnttextview.c

changeset 28638
10bbb81e5550
parent 26718
75cb3afc71bd
child 28769
5e1b495f0135
--- 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 */

mercurial