--- a/gnttextview.c Thu Apr 03 18:45:27 2014 +0200
+++ b/gnttextview.c Thu Apr 03 19:39:58 2014 +0200
@@ -339,6 +339,9 @@
g_return_val_if_fail(select_start != NULL, TRUE);
select_end = gnt_text_view_get_p(view, x - widget->priv.x, y - widget->priv.y);
+ g_return_val_if_fail(select_end != NULL, TRUE); if (select_end < select_start) {
select_start = select_end;
@@ -762,7 +765,7 @@
GntTextLine *line = iter->data;
+ if (G_UNLIKELY(line == NULL)) { @@ -780,6 +783,10 @@
/* This segment starts in the middle of the tag */
free_text_segment(seg, NULL);
+ if (G_UNLIKELY(line == NULL)) { line->segments = g_list_delete_link(line->segments, segs);
if (line->segments == NULL) {
free_text_line(line, NULL);