Attempt to fix nil pointer dereference
This commit is contained in:
parent
f7110da643
commit
808564b940
1 changed files with 1 additions and 1 deletions
|
|
@ -397,7 +397,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) {
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
for port, phoneNumberCallLog := range callLog.Lines {
|
for port, phoneNumberCallLog := range callLog.Lines {
|
||||||
if phoneNumberCallLog.Data == nil {
|
if phoneNumberCallLog == nil || phoneNumberCallLog.Data == nil || phoneNumberCallLog.Data.Entries == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for _, callLogEntry := range phoneNumberCallLog.Data.Entries { //port", "id", "external_number", "direction", "type
|
for _, callLogEntry := range phoneNumberCallLog.Data.Entries { //port", "id", "external_number", "direction", "type
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue