diff --git a/libnetwork/default_gateway.go b/libnetwork/default_gateway.go index 163348b49f..b042539b88 100644 --- a/libnetwork/default_gateway.go +++ b/libnetwork/default_gateway.go @@ -123,7 +123,7 @@ func (sb *sandbox) needDefaultGW() bool { return false } for _, r := range ep.StaticRoutes() { - if r.Destination.String() == "0.0.0.0/0" { + if r.Destination != nil && r.Destination.String() == "0.0.0.0/0" { return false } }