Skip to content

Commit 09f69ac

Browse files
ahkoksofar
authored andcommitted
Bugfix: prevent crash if pid not found.
I'm unsure why this has been hit yet, but this produces proper output and prevents a segfault.
1 parent b0c47b3 commit 09f69ac

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/svg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,6 +1179,8 @@ static void svg_ps_bars(FILE *of,
11791179
if (ps->pid == pid)
11801180
break;
11811181
}
1182+
if (!ps)
1183+
ps = ps_first;
11821184

11831185
/* need to know last node first */
11841186
ps->sample = ps->first;

0 commit comments

Comments
 (0)