X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Ftop.c;h=29b169be7f326505268ff3f7deacad6fadb70f47;hb=5c555deb64c75b2a6f04dc9c6b52756897567483;hp=18b4ee644aef0a57b200307c70e082771e248c05;hpb=c9bde0065e4154a0c36b033388abff55a4610e8a;p=monky diff --git a/src/top.c b/src/top.c index 18b4ee6..29b169b 100644 --- a/src/top.c +++ b/src/top.c @@ -986,9 +986,11 @@ void print_top(struct text_object *obj, char *p, int p_max_size) switch (td->type) { case TOP_NAME: - width = MIN(p_max_size, (int)top_name_width + 1); - snprintf(p, width + 1, "%-*s", width, - needed[td->num]->name); + if (needed[td->num]->name) { + width = MIN(p_max_size, (int)top_name_width + 1); + snprintf(p, width + 1, "%-*s", width, + needed[td->num]->name); + } break; case TOP_CPU: width = MIN(p_max_size, 7);