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()
|
function core:OnEnable()
|
||||||
self.db:RegisterDefaults(defaults)
|
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
|
end
|
||||||
|
|
||||||
function core:OnDisable()
|
function core:OnDisable()
|
||||||
|
|
Loading…
Reference in a new issue