From 72ecb43c59321f8a95dac45e9a44e60e941140e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Wed, 19 Feb 2003 05:59:54 +0000 Subject: [PATCH] * xfaces.c (x_face_list_fonts): Set *pfonts to 0 if no fonts found. --- src/ChangeLog | 4 ++++ src/xfaces.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 04fce4d9811..c37562fb095 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2003-02-19 Jan Dj,Ad(Brv + + * xfaces.c (x_face_list_fonts): Set *pfonts to 0 if no fonts found. + 2003-02-18 Jan Dj,Ad(Brv * xterm.c (x_list_fonts): If maxnames is less than 0, get all font diff --git a/src/xfaces.c b/src/xfaces.c index 0e6fa8daf34..7c668bc5787 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -2516,8 +2516,12 @@ x_face_list_fonts (f, pattern, pfonts, nfonts, try_alternatives_p) { Lisp_Object list = Valternate_fontname_alist; - if (fonts) xfree (fonts); - + if (*pfonts) + { + xfree (*pfonts); + *pfonts = 0; + } + while (CONSP (list)) { Lisp_Object entry = XCAR (list); -- 2.39.2