summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-02-28 23:34:05 +0000
committerMiles Bader <miles@gnu.org>1997-02-28 23:34:05 +0000
commit511e8d24ccee6c25919d4b41a27025f55ca2293d (patch)
tree4167bfee56476193d36c369e575c62b55cbf9738
parentc369a65a4545c7b0e389187d4a1555baeafe8b29 (diff)
(ps_fmt_squash):
Deal with FIELD->spec being NULL when advancing over a field.
-rw-r--r--libps/fmt.c5
1 files changed, 3 insertions, 2 deletions
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 <miles@gnu.ai.mit.edu>
@@ -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++;
}