Skip to content

Commit

Permalink
fix weapons memory leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturKnopik committed Dec 24, 2024
1 parent c419a21 commit 4e0fd25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/weapons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void Weapons::clear(bool fromLua)
{
for (auto it = weapons.begin(); it != weapons.end();) {
if (fromLua == it->second->fromLua) {
delete(it->second);
delete it->second;
it = weapons.erase(it);
} else {
++it;
Expand Down

0 comments on commit 4e0fd25

Please sign in to comment.