diff --git a/models/system/setting.go b/models/system/setting.go index 7b18ad828..c801f9cc1 100644 --- a/models/system/setting.go +++ b/models/system/setting.go @@ -276,7 +276,7 @@ func Init() error { } } - if enableFederatedAvatarSetting.GetValueBool() { + if GravatarSourceURL != nil && enableFederatedAvatarSetting.GetValueBool() { LibravatarService = libravatar.New() if GravatarSourceURL.Scheme == "https" { LibravatarService.SetUseHTTPS(true)