diff --git a/src/kernel/item.c b/src/kernel/item.c index aa975fb8e..e484e6c35 100644 --- a/src/kernel/item.c +++ b/src/kernel/item.c @@ -588,7 +588,9 @@ struct order *ord) use += use_pooled(s, item2resource(itype), GET_RESERVE | GET_POOLED_SLACK, n - use); - rsetmoney(s->region, rmoney(s->region) + use); + if (s->region->land) { + rsetmoney(s->region, rmoney(s->region) + use); + } return 0; } return -1; /* use the mechanism */ diff --git a/src/kernel/region.c b/src/kernel/region.c index aa4c86425..ed56851ee 100644 --- a/src/kernel/region.c +++ b/src/kernel/region.c @@ -603,8 +603,7 @@ void rsetpeasants(region * r, int value) if (r->land) { assert(value >= 0); r->land->peasants = value; - } else - assert(value == 0); + } } int rmoney(const region * r) @@ -617,8 +616,7 @@ void rsethorses(const region * r, int value) if (r->land) { assert(value >= 0); r->land->horses = value; - } else - assert(value == 0); + } } int rhorses(const region * r) @@ -631,8 +629,7 @@ void rsetmoney(region * r, int value) if (r->land) { assert(value >= 0); r->land->money = value; - } else - assert(value == 0); + } } int rherbs(const struct region *r) @@ -645,8 +642,7 @@ void rsetherbs(const struct region *r, int value) if (r->land) { assert(value >= 0); r->land->herbs = (short)(value); - } else - assert(value == 0); + } }