protect nil config
This commit is contained in:
parent
79f8c853db
commit
acd058a536
|
|
@ -95,7 +95,7 @@ func init() {
|
|||
// Run creates the collectors and starts the web server up.
|
||||
// Should be run in a Go routine. Returns nil if not configured.
|
||||
func (u *promUnifi) Run(c poller.Collect) error {
|
||||
if u.Disable {
|
||||
if u.Config == nil || u.Disable {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue