]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug #16930 with broken build --without-x.
authorEli Zaretskii <eliz@gnu.org>
Mon, 3 Mar 2014 19:58:20 +0000 (21:58 +0200)
committerEli Zaretskii <eliz@gnu.org>
Mon, 3 Mar 2014 19:58:20 +0000 (21:58 +0200)
 src/font.c (Fframe_font_cache): Fix last change.

src/ChangeLog
src/font.c

index ecf8503117c35468aa25d81450afdfe39dbe98fc..d23edda95a28cb7e4e902eb6e507ffeff2625645 100644 (file)
@@ -1,5 +1,7 @@
 2014-03-03  Eli Zaretskii  <eliz@gnu.org>
 
+       * 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
index 4c27e1fe8676a9b34cff900be3f943420dbd6b1c..b49664b5f31f6b16c68d7ca3336f42c8252cabc4 100644 (file)
@@ -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 */