* 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.
(cherry picked from commit
2d8881d5267febd0bc4117c2b7e5ee6c33ef436e)
/* This function might be called with the frame's display
connection deleted, in which event the callbacks below
should not be executed, as they generate X requests. */
- if (FRAME_X_DISPLAY (f))
- return;
+ if (!FRAME_X_DISPLAY (f))
+ goto free_face;
#endif /* HAVE_X_WINDOWS */
if (face->gc)
}
#endif /* HAVE_WINDOW_SYSTEM */
+#ifdef HAVE_X_WINDOWS
+ free_face:
+#endif /* HAVE_X_WINDOWS */
xfree (face);
}
}