forked from github/server
kingdoms: removing crash if seeds don't exist.
This commit is contained in:
parent
3ae0abad4b
commit
fd3b6ac6d3
|
@ -52,12 +52,12 @@ init_seed(void)
|
||||||
resource_limit * rdata;
|
resource_limit * rdata;
|
||||||
|
|
||||||
rt_seed = rt_find("seed");
|
rt_seed = rt_find("seed");
|
||||||
assert(rt_seed!=NULL);
|
if (rt_seed!=NULL) {
|
||||||
|
a = a_add(&rt_seed->attribs, a_new(&at_resourcelimit));
|
||||||
a = a_add(&rt_seed->attribs, a_new(&at_resourcelimit));
|
rdata = (resource_limit*)a->data.v;
|
||||||
rdata = (resource_limit*)a->data.v;
|
rdata->limit = limit_seeds;
|
||||||
rdata->limit = limit_seeds;
|
rdata->use = produce_seeds;
|
||||||
rdata->use = produce_seeds;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* mallorn */
|
/* mallorn */
|
||||||
|
|
Loading…
Reference in New Issue