From: Jon Trulson Date: Mon, 2 Jul 2018 20:44:58 +0000 (-0600) Subject: dwtm/WmResource.c: Stop printing garbage when XmeRenderTableGetDefaultFont() fails. X-Git-Tag: 2.3.0~1 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a7ec1c618234c9466d3b280e8174669121fb5c40;p=oweals%2Fcde.git dwtm/WmResource.c: Stop printing garbage when XmeRenderTableGetDefaultFont() fails. --- diff --git a/cde/programs/dtwm/WmResource.c b/cde/programs/dtwm/WmResource.c index 4408ba73..e9dbd74e 100644 --- a/cde/programs/dtwm/WmResource.c +++ b/cde/programs/dtwm/WmResource.c @@ -4482,11 +4482,18 @@ MakeAppearanceResources (WmScreenData *pSD, AppearanceData *pAData, Boolean make if (! XmeRenderTableGetDefaultFont(pAData->fontList, &(pAData->font))) { - sprintf((char *)wmGD.tmpBuffer, ((char *)GETMESSAGE(62, 23, "failed to load font: %.100s\0")), (char*) pAData->fontList); - Warning((char *)wmGD.tmpBuffer); +#if 0 + /* This always prints garbage on failure, which seems to + * always happen at least 1-3 times on startup. + */ + sprintf((char *)wmGD.tmpBuffer, + ((char *)GETMESSAGE(62, 23, "failed to load font: %.100s\0")), (char*) pAData->fontList); +#endif + Warning("XmeRenderTableGetDefaultFont() failed, trying a fixed font"); + #if defined(CSRG_BASED) || defined(__linux__) - /* HACK to try get _some_ font anyway (fontList seems to end up as an empty list on - * some modern systems; investigate) */ + /* HACK to try get _some_ font anyway (fontList seems to end + * up as an empty list on some modern systems; investigate) */ pAData->font = XLoadQueryFont(wmGD.display, "fixed"); if (pAData->font == NULL) {