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 */
|
case 0: /* Untote */
|
||||||
if (!(r->terrain->flags & SEA_REGION)) {
|
if (!(r->terrain->flags & SEA_REGION)) {
|
||||||
unit *u = random_unit(r);
|
unit *u = random_unit(r);
|
||||||
faction * f = u->faction;
|
|
||||||
if (u && !undeadrace(u_race(u))) {
|
if (u && !undeadrace(u_race(u))) {
|
||||||
|
faction * f = u->faction;
|
||||||
if (join_monsters(u, monsters)) {
|
if (join_monsters(u, monsters)) {
|
||||||
ADDMSG(&f->msgs, msg_message("chaos_disease", "unit", u));
|
ADDMSG(&f->msgs, msg_message("chaos_disease", "unit", u));
|
||||||
u_setrace(u, get_race(RC_GHOUL));
|
u_setrace(u, get_race(RC_GHOUL));
|
||||||
|
|
Loading…
Reference in New Issue