aboutsummaryrefslogtreecommitdiffstats
path: root/Decoration.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Decoration.hs')
-rw-r--r--Decoration.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Decoration.hs b/Decoration.hs
index 424021c..1b971ef 100644
--- a/Decoration.hs
+++ b/Decoration.hs
@@ -66,7 +66,8 @@ withGC w fn f = withDisplay $ \d -> do gc <- io $ createGC d w
let fontname = if fn == ""
then "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*"
else fn
- font <- io $ loadQueryFont d fontname
+ font <- io $ catch (loadQueryFont d fontname)
+ (const $ loadQueryFont d "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*")
io $ setFont d gc (fontFromFontStruct font)
f d w gc font
io $ freeGC d gc