From: arg@suckless.org Date: Wed, 19 Sep 2007 15:33:35 +0000 (+0200) Subject: applied yiyus initfont fix X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=56f9e26b7268d653afb6db82aac9bad71abde0dd;p=dmenu.git applied yiyus initfont fix --- diff --git a/dmenu.c b/dmenu.c index 34df9ed..5cb638b 100644 --- a/dmenu.c +++ b/dmenu.c @@ -298,10 +298,9 @@ initfont(const char *fontstr) { if(dc.font.xfont) XFreeFont(dpy, dc.font.xfont); dc.font.xfont = NULL; - if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))) { - if(!(dc.font.xfont = XLoadQueryFont(dpy, "fixed"))) - eprint("error, cannot load font: '%s'\n", fontstr); - } + if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr)) + && !(dc.font.xfont = XLoadQueryFont(dpy, "fixed"))) + eprint("error, cannot load font: '%s'\n", fontstr); dc.font.ascent = dc.font.xfont->ascent; dc.font.descent = dc.font.xfont->descent; }