protect nil config

This commit is contained in:
davidnewhall2 2019-12-29 15:06:25 -08:00
parent 79f8c853db
commit acd058a536
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ func init() {
// Run creates the collectors and starts the web server up. // Run creates the collectors and starts the web server up.
// Should be run in a Go routine. Returns nil if not configured. // Should be run in a Go routine. Returns nil if not configured.
func (u *promUnifi) Run(c poller.Collect) error { func (u *promUnifi) Run(c poller.Collect) error {
if u.Disable { if u.Config == nil || u.Disable {
return nil return nil
} }