summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-04-03 15:50:55 -0400
committerUnknown <joe2010xtmf@163.com>2014-04-03 15:50:55 -0400
commit79a610592ea7c2e93ab2f91190af1782c4aa8f8d (patch)
tree94515ccd8e27fc7f01c08daea725bdd2f3dbee6a /modules
parentbbadbbdf685a7f6cb1924442a115aa88bb520e07 (diff)
downloadgitea-79a610592ea7c2e93ab2f91190af1782c4aa8f8d.tar.gz
gitea-79a610592ea7c2e93ab2f91190af1782c4aa8f8d.zip
Add: rename repository
Diffstat (limited to 'modules')
-rw-r--r--modules/middleware/context.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go
index d2b268cd87..8129b13b7e 100644
--- a/modules/middleware/context.go
+++ b/modules/middleware/context.go
@@ -90,7 +90,9 @@ func (ctx *Context) HTML(status int, name string, htmlOpt ...HTMLOptions) {
func (ctx *Context) RenderWithErr(msg, tpl string, form auth.Form) {
ctx.Data["HasError"] = true
ctx.Data["ErrorMsg"] = msg
- auth.AssignForm(form, ctx.Data)
+ if form != nil {
+ auth.AssignForm(form, ctx.Data)
+ }
ctx.HTML(200, tpl)
}