diff --git a/objects.c b/objects.c index 32e906a..2890f1e 100644 --- a/objects.c +++ b/objects.c @@ -16243,16 +16243,18 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp } if (thrower && hasactivespell(thrower, OT_S_WHATGOESUP)) { - // on the ground? - if ((newob->pile->where == where) && haslof(newob->pile->where, thrower->cell, LOF_NEED, NULL)) { - if (isplayer(thrower)) { - msg("%s returns to you!", obname); - } else if (cansee(player, thrower)) { - msg("%s returns to %s!", obname, throwername); - } else if (haslos(player, newob->pile->where)) { - msg("%s returns to someone!", obname); + if (newob && !isdeadob(newob)) { + // on the ground? + if ((newob->pile->where == where) && haslof(newob->pile->where, thrower->cell, LOF_NEED, NULL)) { + if (isplayer(thrower)) { + msg("%s returns to you!", obname); + } else if (cansee(player, thrower)) { + msg("%s returns to %s!", obname, throwername); + } else if (haslos(player, newob->pile->where)) { + msg("%s returns to someone!", obname); + } + moveob(newob, thrower->pack, newob->amt); } - moveob(newob, thrower->pack, newob->amt); } } }