Wrap package loading callback in safe call

Co-Authored-By: SirAiedail <SirAiedail@users.noreply.github.com>
This commit is contained in:
Azumgi 2018-12-11 14:11:45 +01:00 committed by GitHub
parent 83635ecea5
commit 26f52622f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -112,7 +112,8 @@ function vmf.update_package_manager()
_loading_package = nil
-- The callback has to be called last, so that any calls to `has_package_loaded` or `is_package_loading` return the correct value
loading_package.callback()
vmf.safe_call_nr(loading_package.mod, {"'%s' package loaded callback", loading_package.package_name},
loading_package.callback, loading_package.package_name)
end
return