segfault in `item::Alchemize` (and small bug)

https://attnam.com/topics/segfault-in-item-Alchemize-and-small-bug

The Cathedral of Attnam > Trouble Shooting and Bugs

#1 Mar 7, 7:54 pm Hide

vasiliy

first, `(Midas && IsOnGround())` is excessive. underground shops are not special! i.e. `IsOnGround()` should be removed.

and second: `Midas->SetMoney(Midas->GetMoney() + Price);` is not guarded with `if (Midas)`. it should be: `if (Midas) Midas->EditMoney(Price);`. otherwise alchemy wand broken by mine trap explosion, for example, will cause a segfault.
#2 Mar 7, 10:06 pm Hide

vasiliy

oops. wrong forum. sorry. move it to "bugs", please.
#3 Mar 9, 11:58 am Hide

red_kangaroo

Thanks!