Fixes segfault in dtprintinfo when used UTF-8 locale, bug was caused by unchecked return value of XmeRenderTableGetDefaultFont()
This commit is contained in:
committed by
Jon Trulson
parent
4c56765da3
commit
23e217b329
@@ -96,7 +96,7 @@ static XrmOptionDescRec options[] =
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
extern void XmeRenderTableGetDefaultFont(XmFontList, XFontStruct **);
|
||||
extern Boolean XmeRenderTableGetDefaultFont(XmFontList, XFontStruct **);
|
||||
}
|
||||
|
||||
Application::Application(char *name,
|
||||
@@ -151,9 +151,12 @@ Application::Application(char *name,
|
||||
{
|
||||
XmFontType _type_return;
|
||||
fs = (XFontStruct *)XmFontListEntryGetFont(entry, &_type_return);
|
||||
if (_type_return != XmFONT_IS_FONT)
|
||||
if (_type_return != XmFONT_IS_FONT) {
|
||||
XmeRenderTableGetDefaultFont(userFont, &fs);
|
||||
font = fs->fid;
|
||||
}
|
||||
if (fs) {
|
||||
font = fs->fid;
|
||||
}
|
||||
}
|
||||
XmFontListFreeFontContext(context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user