From b55ff4853d4b46e3dba980fd802fdc11cd01469d Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 19 May 2011 10:01:59 +0200 Subject: 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 Reviewed-by: Egbert Eich --- grid.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'grid.c') 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); } -- cgit v1.2.3