diff --git a/NEWS b/NEWS index d5937c6a..514f8efc 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ procps-ng NEXT * top: add command line 'e' for symmetry with 'E' issue #165 * top: add '4' toggle for two abreast cpu display issue #172 * top: add '!' toggle for combining multiple cpus + * top: fix potential SEGV involving -p switch merge #114 * vmstat: Wide mode gives wider proc columns merge #48 * watch: Add environment variable for interval merge #62 diff --git a/top/top.c b/top/top.c index e06a61fb..11479382 100644 --- a/top/top.c +++ b/top/top.c @@ -6486,6 +6486,8 @@ static int window_show (WIN_t *q, int wmax) { // Display Column Headings -- and distract 'em while we sort (maybe) PUFF("\n%s%s%s", q->capclr_hdr, q->columnhdr, Caps_endline); + // and just in case 'Monpids' is active but matched no processes ... + if (!Frame_maxtask) return 1; // 1 for the column header if (CHKw(q, Show_FOREST)) forest_create(q);