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