minetest-mods / hbsprint

A flexible sprint mod supporting stamina, hunger and monoids.
GNU Lesser General Public License v2.1
14 stars 11 forks source link

fix crash on unknown node #11

Closed Poikilos closed 6 years ago

Poikilos commented 6 years ago

This will fix a crash in occasional situations where node could not be obtained (possibly due to the node being an unknown node, or other unknown reasons). This should fix https://github.com/minetest-mods/hbsprint/issues/10 (see https://github.com/minetest-mods/hbsprint/issues/10#issuecomment-375918960). More testing may be needed (this change will be applied to my server so I will post any new info), but the fix seems fairly straightforward.

Poikilos commented 6 years ago

I was able to reproduce the crash by sprinting on an unknown node, and then was able to confirm that this change prevents the crash in that situation.

sofar commented 6 years ago

trivial, thanks.