From e77fe9c2a06c6de887ea9a68cd9a94079d26044f Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Wed, 26 Dec 2007 22:00:43 +0100 Subject: [PATCH] compute textlen also --- draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/draw.c b/draw.c index 4869c2a15..7dbc10ba6 100644 --- a/draw.c +++ b/draw.c @@ -261,7 +261,7 @@ textwidth_primitive(Display *display, XftFont *font, char *text) unsigned short textwidth(DrawCtx *ctx, XftFont *font, char *text) { - if (!text) + if (!a_strlen(text)) return 0; return textwidth_primitive(ctx->display, font, text); }