summaryrefslogtreecommitdiffstats
path: root/routers/user/setting/profile.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/setting/profile.go')
-rw-r--r--routers/user/setting/profile.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/user/setting/profile.go b/routers/user/setting/profile.go
index 2ca64ad2e5..cf222d0027 100644
--- a/routers/user/setting/profile.go
+++ b/routers/user/setting/profile.go
@@ -118,7 +118,7 @@ func UpdateAvatarSetting(ctx *context.Context, form auth.AvatarForm, ctxUser *mo
ctxUser.AvatarEmail = form.Gravatar
}
- if form.Avatar != nil {
+ if form.Avatar.Filename != "" {
fr, err := form.Avatar.Open()
if err != nil {
return fmt.Errorf("Avatar.Open: %v", err)