CID 205842: con is never NULL.

This commit is contained in:
Enno Rehling 2019-11-18 18:48:28 +01:00
parent 75000f2663
commit beffa1d536
1 changed files with 3 additions and 4 deletions

View File

@ -511,14 +511,13 @@ int build_skill(unit *u, int basesk, int skill_mod) {
*/
static int build_limited(unit * u, const construction * con, int completed, int number, int want, int basesk, int *skill_total) {
int skills = *skill_total;
int made = 0, maxsize = con->maxsize * number;
int made = 0, maxsize;
assert(con);
if (want <= 0) {
return 0;
}
if (con == NULL) {
return ENOMATERIALS;
}
maxsize = con->maxsize * number;
if (completed == maxsize) {
return ECOMPLETE;
}