summaryrefslogtreecommitdiff
path: root/libps/fmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'libps/fmt.c')
-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++;
}