aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2015-01-27 09:19:41 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2015-01-27 09:19:41 +0000
commitdc3e933ec4b73ac93ae866bb979f02045181a17f (patch)
tree6c5945917e1f00b2f828ab00d8094ec1c120f387 /src
parent85169b54a4751438ebb9bbcede57bb45ee4e7ab4 (diff)
fixed gtkut_text_buffer_insert_with_tag_by_name().
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3462 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/gtkutils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gtkutils.c b/src/gtkutils.c
index 8240acc3..8258094d 100644
--- a/src/gtkutils.c
+++ b/src/gtkutils.c
@@ -965,7 +965,7 @@ void gtkut_text_buffer_insert_with_tag_by_name(GtkTextBuffer *buffer,
gtk_text_buffer_insert_with_tags_by_name
(buffer, iter, text, len, tag, NULL);
- if (text[len - 1] != '\n') {
+ if (len > 0 && text[len - 1] != '\n') {
/* somehow returns invalid value first (bug?),
so call it twice */
gtk_text_iter_get_chars_in_line(iter);