From 68104c657b29d605fd6ac05962badceb1bec801e Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Tue, 24 Jul 2007 19:30:47 +0200 Subject: loadQueryFont must be protected by catch Expecially now that fonts can be easily choose with a command line options. darcs-hash:20070724173047-d6583-30c6a0a1315216cb21e3132c64448e01bd846de2.gz --- Xmobar.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Xmobar.hs') diff --git a/Xmobar.hs b/Xmobar.hs index 7142a8d..7e67647 100644 --- a/Xmobar.hs +++ b/Xmobar.hs @@ -140,7 +140,8 @@ drawInWin str = bgcolor <- io $ initColor dpy $ bgColor config gc <- io $ createGC dpy win --let's get the fonts - fontst <- io $ loadQueryFont dpy (font config) + let lf c = loadQueryFont dpy (font c) + fontst <- io $ catch (lf config) (const $ lf defaultConfig) io $ setFont dpy gc (fontFromFontStruct fontst) -- create a pixmap to write to and fill it with a rectangle p <- io $ createPixmap dpy win -- cgit v1.2.3