mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
Fixed leak at WorldFiles::getLights
This commit is contained in:
parent
128bc277b8
commit
35b13adf03
1 changed files with 2 additions and 2 deletions
|
|
@ -207,10 +207,10 @@ ubyte* WorldFiles::getChunk(int x, int z){
|
|||
}
|
||||
|
||||
light_t* WorldFiles::getLights(int x, int z) {
|
||||
ubyte* data = getData(lights, getLightsFolder(), x, z, REGION_LAYER_LIGHTS);
|
||||
std::unique_ptr<ubyte> data (getData(lights, getLightsFolder(), x, z, REGION_LAYER_LIGHTS));
|
||||
if (data == nullptr)
|
||||
return nullptr;
|
||||
return Lightmap::decode(data);
|
||||
return Lightmap::decode(data.get());
|
||||
}
|
||||
|
||||
ubyte* WorldFiles::getData(regionsmap& regions, const fs::path& folder,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue