diff --git a/provision/docker/provisioner.go b/provision/docker/provisioner.go
index <HASH>..<HASH> 100644
--- a/provision/docker/provisioner.go
+++ b/provision/docker/provisioner.go
@@ -1213,6 +1213,10 @@ func pluralize(str string, sz int) string {
 }
 
 func (p *dockerProvisioner) FilterAppsByUnitStatus(apps []provision.App, status []string) []provision.App {
+	if apps == nil || status == nil {
+		return apps
+	}
+
 	appNames := make([]string, len(apps))
 	for i, app := range apps {
 		appNames[i] = app.GetName()
diff --git a/provision/docker/provisioner_test.go b/provision/docker/provisioner_test.go
index <HASH>..<HASH> 100644
--- a/provision/docker/provisioner_test.go
+++ b/provision/docker/provisioner_test.go
@@ -2775,4 +2775,7 @@ func (s *S) TestFilterAppsByUnitStatus(c *check.C) {
 
 	apps = s.p.FilterAppsByUnitStatus([]provision.App{app1, app2}, []string{"building"})
 	c.Assert(apps, check.DeepEquals, []provision.App{})
+
+	apps = s.p.FilterAppsByUnitStatus(nil, []string{"building"})
+	c.Assert(apps, check.IsNil)
 }
provision: handles border cases when filtering apps by unit status