Commit Diff


commit - 3e60c5d836c1f9f3b4415782de48476663943274
commit + ef00902fd91dba280aba605b1a812c2f0cdc3657
blob - 18f2a56d13928798f15b09f8912553c582b2affa
blob + c0addad867c5229e40edc3b2074966fffbc2f641
--- dmenu.c
+++ dmenu.c
@@ -79,7 +79,7 @@ static unsigned int mw, mh;
 static unsigned int numlockmask = 0;
 static Bool running = True;
 static Display *dpy;
-static DC dc = {0};
+static DC dc;
 static Item *allitems = NULL;	/* first of all items */
 static Item *item = NULL;	/* first of pattern matching items */
 static Item *sel = NULL;
@@ -300,9 +300,6 @@ initfont(const char *fontstr) {
 		}
 	}
 	else {
-		if(dc.font.xfont)
-			XFreeFont(dpy, dc.font.xfont);
-		dc.font.xfont = NULL;
 		if(!(dc.font.xfont = XLoadQueryFont(dpy, fontstr))
 		&& !(dc.font.xfont = XLoadQueryFont(dpy, "fixed")))
 			eprint("error, cannot load font: '%s'\n", fontstr);