From 511e8d24ccee6c25919d4b41a27025f55ca2293d Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 28 Feb 1997 23:34:05 +0000 Subject: (ps_fmt_squash): Deal with FIELD->spec being NULL when advancing over a field. --- libps/fmt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libps') diff --git a/libps/fmt.c b/libps/fmt.c index 01199a30..764711ae 100644 --- a/libps/fmt.c +++ b/libps/fmt.c @@ -1,7 +1,7 @@ /* Implements the ps_fmt type, which describes how to output a user-readable version of a proc_stat. - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. Written by Miles Bader @@ -526,7 +526,8 @@ ps_fmt_squash (struct ps_fmt *fmt, int (*fn)(struct ps_fmt_field *field)) else /* don't squash this field, just move to the next one */ { - need |= ps_getter_needs (ps_fmt_spec_getter (field->spec)); + if (field->spec) + need |= ps_getter_needs (field->spec->getter); field++; } -- cgit v1.2.3