cache: fix nil pointer deref - fixes #2448

This commit is contained in:
Nick Craig-Wood 2018-08-07 21:33:13 +01:00
parent e979cd62c1
commit 6156bc5806
1 changed files with 3 additions and 1 deletions

View File

@ -210,7 +210,9 @@ func (p *plexConnector) authenticate() error {
}
p.token = token
if p.token != "" {
p.saveToken(p.token)
if p.saveToken != nil {
p.saveToken(p.token)
}
fs.Infof(p.f.Name(), "Connected to Plex server: %v", p.url.String())
}
p.listenWebsocket()