forked from github/server
bug 2674 fix null-ptr deref
This commit is contained in:
parent
40493bdc64
commit
0ea9717b5a
|
@ -83,8 +83,8 @@ static void chaos(region * r, faction *monsters)
|
|||
case 0: /* Untote */
|
||||
if (!(r->terrain->flags & SEA_REGION)) {
|
||||
unit *u = random_unit(r);
|
||||
faction * f = u->faction;
|
||||
if (u && !undeadrace(u_race(u))) {
|
||||
faction * f = u->faction;
|
||||
if (join_monsters(u, monsters)) {
|
||||
ADDMSG(&f->msgs, msg_message("chaos_disease", "unit", u));
|
||||
u_setrace(u, get_race(RC_GHOUL));
|
||||
|
|
Loading…
Reference in New Issue