jlnunez89 / fibula-mmo

An open source server written in C# for the other-leg-bone-name game (which must not be named).
MIT License
28 stars 7 forks source link

Fix a bug in which the PlayerInventory destructor caused a crash #62

Closed jlnunez89 closed 4 years ago

jlnunez89 commented 4 years ago

Problem:

When the destructor iterated over slots, it did so without disregarding slots without bodyContainers, resulting in a null pointer exception which was unhandled since this ran under the GC thread.

Solution:

Exclude slots without the items in the destruction.