gmtool makes invalid regions (github issue #198).

forgot to null a pointer after freeing it.
This commit is contained in:
Enno Rehling 2015-06-01 19:56:53 +02:00
parent 69821b2a32
commit 6895195659
1 changed files with 3 additions and 1 deletions

View File

@ -956,8 +956,10 @@ void setluxuries(region * r, const luxury_type * sale)
assert(r->land);
if (r->land->demands)
if (r->land->demands) {
freelist(r->land->demands);
r->land->demands = 0;
}
for (ltype = luxurytypes; ltype; ltype = ltype->next) {
struct demand *dmd = malloc(sizeof(struct demand));