From 82da024a4df2a626633a49f70dd3a2889b525d15 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 30 Nov 2014 10:55:26 -0500 Subject: [PATCH] fix #687 --- cmd/web.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/web.go b/cmd/web.go index 6875ddb1d14..9975fa237ba 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -143,8 +143,10 @@ func newMacaron() *macaron.Macaron { })) // OAuth 2. - for _, info := range setting.OauthService.OauthInfos { - m.Use(oauth2.NewOAuth2Provider(info.Options, info.AuthUrl, info.TokenUrl)) + if setting.OauthService != nil { + for _, info := range setting.OauthService.OauthInfos { + m.Use(oauth2.NewOAuth2Provider(info.Options, info.AuthUrl, info.TokenUrl)) + } } m.Use(middleware.Contexter()) return m