mirror of
https://github.com/foxcpp/maddy.git
synced 2025-04-04 05:37:34 +03:00
module: Fix ModSpecificData initialization
This commit is contained in:
parent
0c534f5231
commit
f16506ae1c
1 changed files with 3 additions and 0 deletions
|
@ -49,6 +49,9 @@ func (msd *ModSpecificData) Set(m Module, perInstance bool, value interface{}) {
|
|||
key := msd.modKey(m, perInstance)
|
||||
msd.modDataLck.Lock()
|
||||
defer msd.modDataLck.Unlock()
|
||||
if msd.modData == nil {
|
||||
msd.modData = make(map[string]interface{})
|
||||
}
|
||||
msd.modData[key] = value
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue