# HG changeset patch # User Sadrul Habib Chowdhury # Date 1212721445 0 # Node ID 47492dabcb4a38f995c2a38d6a901a5e9152ca0e # Parent 5e6392e93ce979cc2cf43d145bd419e8723fed4b Fixes a crash when next_begin_word is called on trailing spaces at the end of an entry. applied changes from 0b25c9dd3deaa5c16f7deff33c36af4812f2629a through abef8860abbb7cbebfd89a34d86d43457c0b5caf diff -r 5e6392e93ce9 -r 47492dabcb4a finch/libgnt/gntentry.c --- a/finch/libgnt/gntentry.c Thu Jun 05 23:55:01 2008 +0000 +++ b/finch/libgnt/gntentry.c Fri Jun 06 03:04:05 2008 +0000 @@ -580,11 +580,13 @@ while (text && text < end && g_unichar_isspace(g_utf8_get_char(text))) text = g_utf8_find_next_char(text, end); - ch = g_utf8_get_char(text); - while ((text = g_utf8_find_next_char(text, end)) != NULL && text <= end) { - gunichar cur = g_utf8_get_char(text); - if (!SAME(ch, cur)) - break; + if (text) { + ch = g_utf8_get_char(text); + while ((text = g_utf8_find_next_char(text, end)) != NULL && text <= end) { + gunichar cur = g_utf8_get_char(text); + if (!SAME(ch, cur)) + break; + } } return (text ? text : end); }