diff --git a/attack.cpp b/attack.cpp index 2cd15971..877bba80 100644 --- a/attack.cpp +++ b/attack.cpp @@ -669,7 +669,7 @@ EX void killMonster(cell *c, eMonster who, flagtype deathflags IS(0)) { if(who == moPlayer || (isFriendly(who) && items[itOrbEmpathy])) { eItem o = frog_power(m); if(o && who != moPlayer) markOrb2(itOrbEmpathy); - items[o] += 5; + if(o) items[o] += 5; } if(checkOrb(who, itOrbStone)) petrify(c, waPetrified, m), pcount = 0; diff --git a/items.cpp b/items.cpp index bbcecaa3..094ba9fd 100644 --- a/items.cpp +++ b/items.cpp @@ -222,8 +222,10 @@ EX bool collectItem(cell *c2, bool telekinesis IS(false)) { if(c2->item == itBarrow) for(int i=0; ilandparam; i++) gainItem(c2->item); else if(c2->item) gainItem(c2->item); - if(vid.bubbles_all || (among(items[c2->item], 5, 10, 25, 50, 100, 250, 500) && vid.bubbles_threshold)) + + if(c2->item && (vid.bubbles_all || (among(items[c2->item], 5, 10, 25, 50, 100, 250, 500) && vid.bubbles_threshold))) { drawBubble(c2, iinf[c2->item].color, its(items[c2->item]), 0.5); + } if(c2->item) { char ch = iinf[c2->item].glyph;