Commit 8fc01234 authored by Kjartan Maraas's avatar Kjartan Maraas Committed by Adam Jackson

Bug #7259: Various Coverity fixes.

parent 824f87ba
......@@ -921,7 +921,7 @@ _XftGlyphDefault (Display *dpy, XftFont *public)
if (XftFontCheckGlyph (dpy, public, FcTrue, 0, missing, &nmissing))
glyphs_loaded = FcTrue;
if (nmissing)
XftFontLoadGlyphs (dpy, public, FcTrue, missing, nmissing);
XftFontLoadGlyphs (dpy, public, glyphs_loaded, missing, nmissing);
return font->glyphs[0];
}
......
......@@ -210,7 +210,7 @@ _XftDrawFormat (XftDraw *draw)
{
XftDisplayInfo *info = _XftDisplayInfoGet (draw->dpy, True);
if (!info->hasRender)
if (!info || !info->hasRender)
return 0;
if (draw->visual == 0)
......
......@@ -518,7 +518,7 @@ XftGlyphFontSpecRender (Display *dpy,
break;
}
}
if (i == nglyphs)
if (i == nglyphs || !firstFont)
goto bail2;
glyph = firstFont->glyphs[g];
format = firstFont->format;
......
......@@ -128,8 +128,10 @@ XftXlfdParse (const char *xlfd_orig, FcBool ignore_scalable, FcBool complete)
save = (char *) malloc (strlen (foundry) + 1);
if (!save)
if (!save) {
FcPatternDestroy (pat);
return 0;
}
if (!FcPatternAddString (pat, XFT_XLFD, (FcChar8 *) xlfd_orig)) goto bail;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment