diff --git a/src/explode.c b/src/explode.c index 768aa72c9..c2b76bf4a 100644 --- a/src/explode.c +++ b/src/explode.c @@ -840,7 +840,10 @@ scatter(coordxy sx, coordxy sy, /* location of objects to scatter */ gt.thrownobj = stmp->obj; /* mainly in case it kills hero */ gb.bhitpos.x = stmp->ox + stmp->dx; gb.bhitpos.y = stmp->oy + stmp->dy; - typ = levl[gb.bhitpos.x][gb.bhitpos.y].typ; + if (isok(gb.bhitpos.x, gb.bhitpos.y)) + typ = levl[gb.bhitpos.x][gb.bhitpos.y].typ; + else + typ = STONE; if (!isok(gb.bhitpos.x, gb.bhitpos.y)) { gb.bhitpos.x -= stmp->dx; gb.bhitpos.y -= stmp->dy;