# HG changeset patch # User Richard M. Stallman # Date 739782852 0 # Node ID df1a2751ca24646194c1731583284281f64441ab # Parent 70a688f0cdaec90f58fb9689b537dd4b0ccf5193 (Fx_list_fonts): If names is 0, just return nil. diff -r 70a688f0cdae -r df1a2751ca24 src/xfns.c --- a/src/xfns.c Fri Jun 11 07:02:36 1993 +0000 +++ b/src/xfns.c Fri Jun 11 07:14:12 1993 +0000 @@ -2227,22 +2227,24 @@ &info); /* info_return */ UNBLOCK_INPUT; - { - Lisp_Object *tail; - int i; - - list = Qnil; - tail = &list; - for (i = 0; i < num_fonts; i++) - if (! size_ref - || same_size_fonts (&info[i], size_ref)) - { - *tail = Fcons (build_string (names[i]), Qnil); - tail = &XCONS (*tail)->cdr; - } - - XFreeFontInfo (names, info, num_fonts); - } + list = Qnil; + + if (names) + { + Lisp_Object *tail; + int i; + + tail = &list; + for (i = 0; i < num_fonts; i++) + if (! size_ref + || same_size_fonts (&info[i], size_ref)) + { + *tail = Fcons (build_string (names[i]), Qnil); + tail = &XCONS (*tail)->cdr; + } + + XFreeFontInfo (names, info, num_fonts); + } return list; }