summaryrefslogtreecommitdiff
path: root/grid.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2011-05-19 10:01:59 +0200
committerEgbert Eich <eich@freedesktop.org>2013-01-07 09:27:05 -0500
commitb55ff4853d4b46e3dba980fd802fdc11cd01469d (patch)
treeaf5a4773d5e066a742dc09da3da7f2792de53bcb /grid.c
parent7f743669076189b615c862d0ec6b6c45d855d9b6 (diff)
Fix SEGV when XftFontOpenName() returns NULL.
The semantics of a callback set with XtSetTypeConverter() is to return False only if there is no conversion at all. In this case the converstion string is copied verbatim to the target. Since the 'from' and 'to' types differ this doesn't make sense here at all. Instead the target value needs to be set to NULL and the return needs to be True. Signed-off-by: Andreas Schwab <schwab@suse.de> Reviewed-by: Egbert Eich <eich@freedesktop.org>
Diffstat (limited to 'grid.c')
-rw-r--r--grid.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/grid.c b/grid.c
index e1f134d..49f7693 100644
--- a/grid.c
+++ b/grid.c
@@ -542,10 +542,7 @@ XmuCvtStringToXftFont(Display *dpy,
XScreenNumberOfScreen (screen),
name);
if (!font)
- {
XtDisplayStringConversionWarning(dpy, (char *) fromVal->addr, XtRXftFont);
- return False;
- }
}
donestr (XftFont *, font, XtRXftFont);
}