Mercurial > pidgin
diff console/libgnt/gnttextview.c @ 15764:f1e4121dcb1e
Fix a crash when selecting text in an empty TV.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 05 Mar 2007 01:26:31 +0000 |
parents | e0027ebd2300 |
children | b5c4de70577d |
line wrap: on
line diff
--- a/console/libgnt/gnttextview.c Sat Mar 03 04:06:19 2007 +0000 +++ b/console/libgnt/gnttextview.c Mon Mar 05 01:26:31 2007 +0000 @@ -204,9 +204,9 @@ do { line = lines->data; lines = lines->next; - } while (line && !line->segments); + } while (line && !line->segments && lines); - if (!line) /* no valid line */ + if (!line || !line->segments) /* no valid line */ return NULL; segs = line->segments; seg = (GntTextSegment *)segs->data;