Potential nullptr access fix
This commit is contained in:
parent
ad81e64461
commit
57e9cade7b
@ -179,6 +179,9 @@ static int l_set_chunk_data(lua::State* L) {
|
||||
is_compressed = lua::toboolean(L, 4);
|
||||
}
|
||||
auto chunk = level->chunks->getChunk(x, y);
|
||||
if(chunk== nullptr){
|
||||
return 0;
|
||||
}
|
||||
if (is_compressed) {
|
||||
std::vector<ubyte>& raw_data = buffer->data();
|
||||
size_t gzip_decompressed_size =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user