Fix typo incurring leaks of face structures
* src/xfaces.c (free_realized_face): Always free realized face structures, and avoid sending X requests when the display is not available, not when it is.
This commit is contained in:
parent
219501dd62
commit
2d8881d526
1 changed files with 5 additions and 2 deletions
|
@ -4599,8 +4599,8 @@ free_realized_face (struct frame *f, struct face *face)
|
||||||
/* This function might be called with the frame's display
|
/* This function might be called with the frame's display
|
||||||
connection deleted, in which event the callbacks below
|
connection deleted, in which event the callbacks below
|
||||||
should not be executed, as they generate X requests. */
|
should not be executed, as they generate X requests. */
|
||||||
if (FRAME_X_DISPLAY (f))
|
if (!FRAME_X_DISPLAY (f))
|
||||||
return;
|
goto free_face;
|
||||||
#endif /* HAVE_X_WINDOWS */
|
#endif /* HAVE_X_WINDOWS */
|
||||||
|
|
||||||
if (face->gc)
|
if (face->gc)
|
||||||
|
@ -4619,6 +4619,9 @@ free_realized_face (struct frame *f, struct face *face)
|
||||||
}
|
}
|
||||||
#endif /* HAVE_WINDOW_SYSTEM */
|
#endif /* HAVE_WINDOW_SYSTEM */
|
||||||
|
|
||||||
|
#ifdef HAVE_X_WINDOWS
|
||||||
|
free_face:
|
||||||
|
#endif /* HAVE_X_WINDOWS */
|
||||||
xfree (face);
|
xfree (face);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue