From 4c506484800c9558456a2f25bd09f270689e83fc Mon Sep 17 00:00:00 2001 From: emile Date: Thu, 8 Oct 2015 09:31:30 +0200 Subject: [PATCH] Corrects https://github.com/EmileVauge/traefik/issues/37 --- marathon.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/marathon.go b/marathon.go index fc4f80e7d..89d236f74 100644 --- a/marathon.go +++ b/marathon.go @@ -112,6 +112,10 @@ func (provider *MarathonProvider) loadMarathonConfig() *Configuration { return false } application := getApplication(task, applications.Apps) + if application == nil { + log.Errorf("Unable to get marathon application from task %s", task.AppID) + return false + } _, err := strconv.Atoi(application.Labels["traefik.port"]) if len(application.Ports) > 1 && err != nil { log.Debug("Filtering marathon task with more than 1 port and no traefik.port label", task.AppID)