From 757c70af04476ffdaf24cee8d0d2ecd175635aeb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 3 Mar 2014 21:58:20 +0200 Subject: [PATCH] Fix bug #16930 with broken build --without-x. src/font.c (Fframe_font_cache): Fix last change. --- src/ChangeLog | 2 ++ src/font.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index ecf8503117c..d23edda95a2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2014-03-03 Eli Zaretskii + * font.c (Fframe_font_cache): Fix last change. (Bug#16930) + * gmalloc.c (aligned_alloc): Fix adjustment of size of the allocated buffer due to alignment. (freehook): If the block to be freed was allocated by diff --git a/src/font.c b/src/font.c index 4c27e1fe867..b49664b5f31 100644 --- a/src/font.c +++ b/src/font.c @@ -4850,7 +4850,14 @@ DEFUN ("frame-font-cache", Fframe_font_cache, Sframe_font_cache, 0, 1, 0, If FRAME is omitted or nil, use the selected frame. */) (Lisp_Object frame) { - return FRAME_DISPLAY_INFO (decode_live_frame (frame))->name_list_element; +#ifdef HAVE_WINDOW_SYSTEM + struct frame *f = decode_live_frame (frame); + + if (FRAME_WINDOW_P (f)) + return FRAME_DISPLAY_INFO (f)->name_list_element; + else +#endif + return Qnil; } #endif /* FONT_DEBUG */ -- 2.39.2