mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
fix for nil pointer in UpdateQueues
This commit is contained in:
@@ -83,9 +83,12 @@ func (s *Stats) UpdateQueues(css []*CdrStats, out *int) error {
|
||||
for _, cs := range css {
|
||||
var sq *StatsQueue
|
||||
var existing bool
|
||||
if sq, existing = oldQueues[cs.Id]; existing {
|
||||
sq.conf = cs
|
||||
} else {
|
||||
if oldQueues != nil {
|
||||
if sq, existing = oldQueues[cs.Id]; existing {
|
||||
sq.conf = cs
|
||||
}
|
||||
}
|
||||
if sq == nil {
|
||||
sq = NewStatsQueue(cs)
|
||||
}
|
||||
s.queues[cs.Id] = sq
|
||||
|
||||
Reference in New Issue
Block a user