diff --git a/drw.c b/drw.c index a9c23cd..a9c2916 100644 --- a/drw.c +++ b/drw.c @@ -448,7 +448,7 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lp const char *ellipsis = "..."; static unsigned int ellipsis_width = 0; - if (!drw || (render && !drw->scheme) || !text || !drw->fonts) + if (!drw || (render && (!drw->scheme || !w)) || !text || !drw->fonts) return 0; if (!render) {