1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-25 12:10:03 +00:00

top: fix segfault for $if_running

The "name" field may be zero, which makes strcmp() freak out.
This commit is contained in:
Phil Sutter 2009-11-12 21:32:59 +01:00
parent e26c9977f2
commit e787870eb4

View File

@ -131,7 +131,7 @@ struct process *get_process_by_name(const char *name)
struct process *p = first_process;
while (p) {
if (!strcmp(p->name, name))
if (p->name && !strcmp(p->name, name))
return p;
p = p->next;
}