CID 22545: Leak of memory or pointers to system resources

github issue #335
volcano destruction was not causing a resuction in wages etc., because we forgot to add the attribute to the region.
This commit is contained in:
Enno Rehling 2015-11-04 19:13:15 +01:00
parent c9f886078b
commit 4d1f2327fe
1 changed files with 2 additions and 2 deletions

View File

@ -580,8 +580,8 @@ volcano_destruction(region * volcano, region * r, const char *damage)
rsettrees(r, 0, 0); rsettrees(r, 0, 0);
a = a_find(r->attribs, &at_reduceproduction); a = a_find(r->attribs, &at_reduceproduction);
if (!a) { if (a) {
a = make_reduceproduction(percent, time); a = a_add(&r->attribs, make_reduceproduction(percent, time));
} }
else { else {
/* Produktion vierteln ... */ /* Produktion vierteln ... */