summaryrefslogtreecommitdiff
blob: 2613bbc1421b628b33059bd994aeda7b5a911987 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 7b87c27..e234b76 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);