mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Fix some reference counters (memleak) (#8981)
Fix some reference counters (memleak) Map::dispatchEvent: Allocation safety using references
This commit is contained in:
@@ -1035,7 +1035,7 @@ int ModApiEnvMod::l_fix_light(lua_State *L)
|
||||
for (auto &modified_block : modified_blocks)
|
||||
event.modified_blocks.insert(modified_block.first);
|
||||
|
||||
map.dispatchEvent(&event);
|
||||
map.dispatchEvent(event);
|
||||
}
|
||||
lua_pushboolean(L, success);
|
||||
|
||||
@@ -1144,7 +1144,7 @@ int ModApiEnvMod::l_delete_area(lua_State *L)
|
||||
}
|
||||
}
|
||||
|
||||
map.dispatchEvent(&event);
|
||||
map.dispatchEvent(event);
|
||||
lua_pushboolean(L, success);
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user