aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rc/runscript.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 7b87c27f..e234b766 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -877,11 +877,13 @@ static void svc_start(bool deps)
}
/* Do the same for any services we provide */
- tmplist = rc_deptree_depend(deptree, "iprovide", applet);
- if (tmplist) {
- TAILQ_FOREACH(svc, tmplist, entries) {
- services = rc_services_scheduled(svc->value);
- if (services) {
+ if (deptree) {
+ tmplist = rc_deptree_depend(deptree, "iprovide", applet);
+ if (tmplist) {
+ TAILQ_FOREACH(svc, tmplist, entries) {
+ services = rc_services_scheduled(svc->value);
+ if (! services)
+ continue;
TAILQ_FOREACH(svc2, services, entries)
if (rc_service_state(svc2->value) & RC_SERVICE_STOPPED)
service_start(svc2->value);