diff options
Diffstat (limited to 'Minecraft.World/ArmorSlot.cpp')
| -rw-r--r-- | Minecraft.World/ArmorSlot.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Minecraft.World/ArmorSlot.cpp b/Minecraft.World/ArmorSlot.cpp index 1efe0b71..27993d77 100644 --- a/Minecraft.World/ArmorSlot.cpp +++ b/Minecraft.World/ArmorSlot.cpp @@ -19,6 +19,10 @@ int ArmorSlot::getMaxStackSize() bool ArmorSlot::mayPlace(shared_ptr<ItemInstance> item) { + if (item == NULL) + { + return false; + } if ( dynamic_cast<ArmorItem *>( item->getItem() ) != NULL) { return dynamic_cast<ArmorItem *>( item->getItem() )->slot == slotNum; |
