mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix two memleak reports from Coverity (#12466)
This commit is contained in:
parent
4b087a0de2
commit
4163c872af
2 changed files with 3 additions and 2 deletions
|
@ -1219,7 +1219,8 @@ int ModApiEnvMod::l_emerge_area(lua_State *L)
|
|||
sortBoxVerticies(bpmin, bpmax);
|
||||
|
||||
size_t num_blocks = VoxelArea(bpmin, bpmax).getVolume();
|
||||
assert(num_blocks != 0);
|
||||
if (num_blocks == 0)
|
||||
return 0;
|
||||
|
||||
if (lua_isfunction(L, 3)) {
|
||||
callback = LuaEmergeAreaCallback;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue