DtHelp: Apply graceful degradation for font loading to avoid a segmentation
fault.
This commit is contained in:
@@ -849,10 +849,17 @@ ResolveFont (
|
||||
if (charset != NULL)
|
||||
xrmList[_DT_HELP_FONT_CHAR_SET] = XrmStringToQuark(charset);
|
||||
|
||||
if (NULL == xlfdSpec ||
|
||||
_DtHelpGetExactFontIndex(pDAS,lang,charset,xlfdSpec,ret_idx)!=0)
|
||||
if (NULL != xlfdSpec)
|
||||
result = _DtHelpGetExactFontIndex(pDAS,lang,charset,xlfdSpec,ret_idx);
|
||||
|
||||
if (result)
|
||||
result = __DtHelpFontIndexGet (pDAS, xrmList, ret_idx);
|
||||
|
||||
if (result) {
|
||||
_DtHelpCopyCasualList(xrmList);
|
||||
result = __DtHelpFontIndexGet(pDAS, xrmList, ret_idx);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user