From 7e46c4924c584f405b8d61f0fd4b2292bc6febdf Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Tue, 13 Oct 2015 22:01:58 +0300 Subject: [PATCH] Fix segfault when the Wiz fails to reappear due to makemon failing --- src/wizard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wizard.c b/src/wizard.c index f1d6a5e01..2076062ea 100644 --- a/src/wizard.c +++ b/src/wizard.c @@ -519,7 +519,7 @@ resurrect() mtmp = makemon(&mons[PM_WIZARD_OF_YENDOR], u.ux, u.uy, MM_NOWAIT); /* affects experience; he's not coming back from a corpse but is subject to repeated killing like a revived corpse */ - mtmp->mrevived = 1; + if (mtmp) mtmp->mrevived = 1; } else { /* look for a migrating Wizard */ verb = "elude";