aboutsummaryrefslogtreecommitdiff
path: root/src/wrap.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2013-04-09 20:30:22 +0200
committerThomas White <taw@bitwiz.org.uk>2013-04-09 20:30:22 +0200
commitcd8dba80ecb35765e81d6e0771a267a5e671dde6 (patch)
tree67008d6d47a9c6e36c067ceefaeeafd5c2521bc0 /src/wrap.c
parent0cfa6ad86163fc35292a0a844cd05dc9ef376e32 (diff)
Handle empty wrap boxes
Diffstat (limited to 'src/wrap.c')
-rw-r--r--src/wrap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wrap.c b/src/wrap.c
index 9f09045..377b720 100644
--- a/src/wrap.c
+++ b/src/wrap.c
@@ -203,6 +203,11 @@ static int add_wrap_box(struct wrap_line *line, char *text, size_t offset,
box->col[3] = col[3]; /* Alpha */
line->n_boxes++;
+ if ( strlen(text) == 0 ) {
+ box->type = WRAP_BOX_NOTHING;
+ return 0;
+ }
+
attrs = pango_attr_list_new();
attr = pango_attr_font_desc_new(fontdesc);
pango_attr_list_insert_before(attrs, attr);