destroy 'pat' always
This commit is contained in:
parent
d634731fca
commit
3dc4750ea4
1 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,7 @@ static gboolean started = FALSE;
|
||||||
static void font_startup(void)
|
static void font_startup(void)
|
||||||
{
|
{
|
||||||
if (!XftInit(0)) {
|
if (!XftInit(0)) {
|
||||||
g_warning(_("Couldn't initialize Xft.\n"));
|
g_warning(_("Couldn't initialize Xft."));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
FcNameRegisterObjectTypes(objs, (sizeof(objs) / sizeof(objs[0])));
|
FcNameRegisterObjectTypes(objs, (sizeof(objs) / sizeof(objs[0])));
|
||||||
|
@ -56,6 +56,7 @@ static RrFont *openfont(const RrInstance *inst, char *fontstring)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
match = XftFontMatch(RrDisplay(inst), RrScreen(inst), pat, &res);
|
match = XftFontMatch(RrDisplay(inst), RrScreen(inst), pat, &res);
|
||||||
|
FcPatternDestroy(pat);
|
||||||
if (!match)
|
if (!match)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -112,6 +113,7 @@ RrFont *RrFontOpen(const RrInstance *inst, char *fontstring)
|
||||||
void RrFontClose(RrFont *f)
|
void RrFontClose(RrFont *f)
|
||||||
{
|
{
|
||||||
if (f) {
|
if (f) {
|
||||||
|
g_message("freeing %p", f);
|
||||||
XftFontClose(RrDisplay(f->inst), f->xftfont);
|
XftFontClose(RrDisplay(f->inst), f->xftfont);
|
||||||
g_free(f);
|
g_free(f);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue