Check if package exists before attempting to load

This commit is contained in:
Lucas Schwiderski 2018-12-10 16:06:02 +01:00
parent 09ce5e281c
commit d0d0d5ef91

View file

@ -23,6 +23,11 @@ function VMFMod:load_package(package_name, callback)
local resource_package = Mod.resource_package(mod_handle, package_name)
if not resource_package then
self:error("Could not find package '%s'.", package_name)
return
end
local is_loading = self:is_package_loading(package_name)
if not callback then