diff options
author | cloudygoose <[email protected]> | 2015-06-05 21:40:45 +0800 |
---|---|---|
committer | cloudygoose <[email protected]> | 2015-06-05 21:40:45 +0800 |
commit | 5b4cc22736ade93f4d8348513c4a35f6a9f9be04 (patch) | |
tree | 255fbddedcdb25b88f4a70268cb6b1ffbaa5afed /io/init.lua | |
parent | 90f2b7c257c286e6c52432ed43807f332d97cc7e (diff) | |
parent | 37af4bed9c3680fdb9db569605f15013e9b6b64d (diff) |
...
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'io/init.lua')
-rw-r--r-- | io/init.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/io/init.lua b/io/init.lua index c151804..b722a81 100644 --- a/io/init.lua +++ b/io/init.lua @@ -18,6 +18,9 @@ function nerv.ChunkFile:write_chunk(chunk) end function nerv.ChunkFile:read_chunk(id, global_conf) + if self.metadata == nil then + nerv.error("wrong file opening mode") + end local metadata = self.metadata[id] if metadata == nil then nerv.error("chunk with id %s does not exist", id) |