mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-16 16:21:30 +02:00
Merge pull request #858 from johnjohto/fix-modkit-headless-love
Keep CacheFs.read from crashing when modkit runs headless
This commit is contained in:
@@ -294,6 +294,9 @@ function CacheFs.read(rel)
|
||||
f:close()
|
||||
return data
|
||||
end
|
||||
-- headless (plain luajit, e.g. the modkit validate/pack driver): there is
|
||||
-- no save directory to read from, so a cache miss is nil, not a crash
|
||||
if not (love and love.filesystem) then return nil end
|
||||
return love.filesystem.read(rel)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user