Fix null pointer exception
All checks were successful
the build was successful

This commit is contained in:
Peter Stuifzand 2018-12-16 22:08:33 +01:00
parent e30046cadd
commit c9f06518c1
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -107,8 +107,6 @@ func NewApp(options AppOptions) *App {
options: options,
}
var backend *memoryBackend
app.backend = loadMemoryBackend()
app.backend.AuthEnabled = options.AuthEnabled
@ -130,7 +128,7 @@ func NewApp(options AppOptions) *App {
})
if !options.Headless {
handler, err := newMainHandler(backend, options.BaseURL, options.TemplateDir)
handler, err := newMainHandler(app.backend, options.BaseURL, options.TemplateDir)
if err != nil {
log.Fatal(err)
}