aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/text')
-rw-r--r--widgets/text/e-text.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index ea2a655932..ed87f21c95 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -851,7 +851,7 @@ split_into_lines (EText *text)
laststart = text->text;
cp = text->text;
- for (p = unicode_get_utf8 (cp, &unival); line_num < text->num_lines && unival; cp = p, p = unicode_get_utf8 (p, &unival)) {
+ for (p = unicode_get_utf8 (cp, &unival); p && unival && line_num < text->num_lines; cp = p, p = unicode_get_utf8 (p, &unival)) {
gboolean handled = FALSE;
if (len == 0)
lines->text = cp;