Check if package exists before attempting to load
This commit is contained in:
parent
09ce5e281c
commit
d0d0d5ef91
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue