Fix segfault when no coldplugged services, thanks to Daijo.

This commit is contained in:
Roy Marples 2008-03-24 13:30:24 +00:00
parent 5a80daaf43
commit 0347f01345

View File

@ -632,8 +632,9 @@ static void do_coldplug(void)
/* Load our list of coldplugged services and display them */
einfon("Device initiated services:%s", ecolor(ECOLOR_HILITE));
coldplugged_services = rc_services_in_state(RC_SERVICE_COLDPLUGGED);
TAILQ_FOREACH(s, coldplugged_services, entries)
printf(" %s", s->value);
if (coldplugged_services)
TAILQ_FOREACH(s, coldplugged_services, entries)
printf(" %s", s->value);
printf ("%s\n", ecolor(ECOLOR_NORMAL));
}