safe calls to db callbacks
This commit is contained in:
parent
ba42823d63
commit
cd8f501570
1 changed files with 5 additions and 1 deletions
|
@ -71,7 +71,11 @@ end
|
|||
|
||||
function core:OnEnable()
|
||||
self.db:RegisterDefaults(defaults)
|
||||
for mod,fn in pairs(databaseCallback) do fn(db.modules[mod]) end
|
||||
for mod,fn in pairs(databaseCallback) do
|
||||
xpcall(function()
|
||||
fn(db.modules[mod])
|
||||
end, geterrorhandler())
|
||||
end
|
||||
end
|
||||
|
||||
function core:OnDisable()
|
||||
|
|
Loading…
Reference in a new issue