mcktr / check_fritz

Check plugin written in Go to monitor a Fritz!Box
GNU General Public License v2.0
32 stars 10 forks source link

panic when no AIN is set and a method that expects one is used #88

Closed mcktr closed 4 years ago

mcktr commented 4 years ago
michael@metis ~/go/src/github.com/mcktr/check_fritz (master) $ build/check_fritz.linux.amd64 -H 192.168.178.1 -p secret -m smart_heatertemperatur
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x77aabb]

goroutine 1 [running]:
main.CheckSpecificSmartHeaterTemperatur(0xc00018fc68, 0xc00018fc28, 0xc00018fc18, 0xc00018fc38, 0xc00018fc58, 0x0, 0x0, 0x0, 0xc00018fbe8, 0xc00018fc48, ...)
    /home/michael/go/src/github.com/mcktr/check_fritz/cmd/check_fritz/check_smart.go:61 +0x2fb
main.checkMain(0xc00002ac40, 0xc00000f000, 0x16)
    /home/michael/go/src/github.com/mcktr/check_fritz/cmd/check_fritz/main.go:175 +0xa58
github.com/urfave/cli/v2.(*App).RunContext(0xc000001980, 0x8a9580, 0xc0000160d8, 0xc000012070, 0x7, 0x7, 0x0, 0x0)
    /home/michael/go/pkg/mod/github.com/urfave/cli/v2@v2.2.0/app.go:315 +0x70d
github.com/urfave/cli/v2.(*App).Run(...)
    /home/michael/go/pkg/mod/github.com/urfave/cli/v2@v2.2.0/app.go:215
main.main()
    /home/michael/go/src/github.com/mcktr/check_fritz/cmd/check_fritz/main.go:301 +0xb39