summaryrefslogtreecommitdiff
path: root/pango/pango-layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/pango-layout.c')
-rw-r--r--pango/pango-layout.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index fa6fbc53..6d6e0c17 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -5243,11 +5243,14 @@ justify_clusters (PangoLayoutLine *line,
/* distribute to before/after */
distribute_letter_spacing (adjustment, &space_left, &space_right);
- glyphs->glyphs[i-1].geometry.width += space_left ;
- glyphs->glyphs[i ].geometry.width += space_right;
- glyphs->glyphs[i ].geometry.x_offset += space_right;
-
- added_so_far += adjustment;
+ if (i)
+ {
+ glyphs->glyphs[i-1].geometry.width += space_left ;
+ glyphs->glyphs[i ].geometry.width += space_right;
+ glyphs->glyphs[i ].geometry.x_offset += space_right;
+
+ added_so_far += adjustment;
+ }
}
}
}