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