From fbce780003fe59cd1b2fe4b763052cb46948164b Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 11 Feb 2008 08:49:10 +0100 Subject: [PATCH] check iso2utf8 return --- common/draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/draw.c b/common/draw.c index df761f52b..61e7938c7 100644 --- a/common/draw.c +++ b/common/draw.c @@ -137,7 +137,8 @@ draw_text(DrawCtx *ctx, /* copy text to buffer */ buf = a_strdup(text); /* try to convert it to UTF-8 */ - buf = draw_iso2utf8(buf); + if(!(buf = draw_iso2utf8(buf))) + return; /* check that the text is not too long */ while(len && (nw = (draw_textwidth(ctx->display, font, buf)) + padding * 2) > area.width)