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;
|
||||
|
||||
rt_seed = rt_find("seed");
|
||||
assert(rt_seed!=NULL);
|
||||
|
||||
a = a_add(&rt_seed->attribs, a_new(&at_resourcelimit));
|
||||
rdata = (resource_limit*)a->data.v;
|
||||
rdata->limit = limit_seeds;
|
||||
rdata->use = produce_seeds;
|
||||
if (rt_seed!=NULL) {
|
||||
a = a_add(&rt_seed->attribs, a_new(&at_resourcelimit));
|
||||
rdata = (resource_limit*)a->data.v;
|
||||
rdata->limit = limit_seeds;
|
||||
rdata->use = produce_seeds;
|
||||
}
|
||||
}
|
||||
|
||||
/* mallorn */
|
||||
|
|
Loading…
Reference in New Issue