changeset 49863:6d5c33f4dd05

* xfaces.c (x_face_list_fonts): Set *pfonts to 0 if no fonts found.
author Jan Djärv <jan.h.d@swipnet.se>
date Wed, 19 Feb 2003 05:59:54 +0000
parents 22e7cf92fa43
children a2add8cdc33a
files src/ChangeLog src/xfaces.c
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Feb 19 02:51:22 2003 +0000
+++ b/src/ChangeLog	Wed Feb 19 05:59:54 2003 +0000
@@ -1,3 +1,7 @@
+2003-02-19  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
+
+	* xfaces.c (x_face_list_fonts): Set *pfonts to 0 if no fonts found.
+
 2003-02-18  Jan Dj,Ad(Brv  <jan.h.d@swipnet.se>
 
 	* xterm.c (x_list_fonts): If maxnames is less than 0, get all font
--- a/src/xfaces.c	Wed Feb 19 02:51:22 2003 +0000
+++ b/src/xfaces.c	Wed Feb 19 05:59:54 2003 +0000
@@ -2516,8 +2516,12 @@
     {
       Lisp_Object list = Valternate_fontname_alist;
 
-      if (fonts) xfree (fonts);
-      
+      if (*pfonts)
+        {
+          xfree (*pfonts);
+          *pfonts = 0;
+        }
+
       while (CONSP (list))
 	{
 	  Lisp_Object entry = XCAR (list);