changeset 91237:0587b2cd9d9a

(x_check_font) [USE_FONT_BACKEND]: Don't access dpyinfo->font_table. (x_delete_display) [USE_FONT_BACKEND]: Likewise. (x_delete_terminal) [USE_FONT_BACKEND]: Likewise
author Kenichi Handa <handa@m17n.org>
date Fri, 14 Dec 2007 12:52:48 +0000
parents e3ba579aab1f
children 5cf14a2107b5
files src/xterm.c
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/xterm.c	Fri Dec 14 11:16:47 2007 +0000
+++ b/src/xterm.c	Fri Dec 14 12:52:48 2007 +0000
@@ -10349,6 +10349,11 @@
 
   xassert (font != NULL);
 
+#ifdef USE_FONT_BACKEND
+  if (enable_font_backend)
+    /* Fixme: Perhaps we should check all cached fonts.  */
+    return;
+#endif
   for (i = 0; i < dpyinfo->n_fonts; i++)
     if (dpyinfo->font_table[i].name
 	&& font == dpyinfo->font_table[i].font)
@@ -11592,6 +11597,10 @@
     xim_close_dpy (dpyinfo);
 #endif
 
+#ifdef USE_FONT_BACKEND
+  if (! enable_font_backend)
+    {
+#endif
   /* Free the font names in the font table.  */
   for (i = 0; i < dpyinfo->n_fonts; i++)
     if (dpyinfo->font_table[i].name)
@@ -11607,6 +11616,10 @@
 	xfree (dpyinfo->font_table->font_encoder);
       xfree (dpyinfo->font_table);
     }
+#ifdef USE_FONT_BACKEND
+    }
+#endif
+
   if (dpyinfo->x_id_name)
     xfree (dpyinfo->x_id_name);
   if (dpyinfo->color_cells)
@@ -11716,6 +11729,9 @@
     return;
 
   BLOCK_INPUT;
+#ifdef USE_FONT_BACKEND
+  if (! enable_font_backend)
+#endif
   /* Free the fonts in the font table.  */
   for (i = 0; i < dpyinfo->n_fonts; i++)
     if (dpyinfo->font_table[i].name)