diff options
author | JacobF <queatz@gmail.com> | 2011-08-30 11:38:53 -0400 |
---|---|---|
committer | JacobF <queatz@gmail.com> | 2011-08-30 11:38:53 -0400 |
commit | 6415528f968f950cb6b4d6139e336f60a0260515 (patch) | |
tree | 0ff5e80574669983e66aa7981e538cab7cabf200 /src/inventory.cpp | |
parent | 4af1f2963c54300b168deb0eada25ecfb8822d1b (diff) | |
download | minetest-6415528f968f950cb6b4d6139e336f60a0260515.tar.gz minetest-6415528f968f950cb6b4d6139e336f60a0260515.tar.bz2 minetest-6415528f968f950cb6b4d6139e336f60a0260515.zip |
If there was no source item in a furnace it would cause a segmentation fault.
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r-- | src/inventory.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp index 62aedb536..116ceeb6d 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -581,6 +581,8 @@ bool InventoryList::roomForItem(const InventoryItem *item) bool InventoryList::roomForCookedItem(const InventoryItem *item) { + if(!item) + return false; const InventoryItem *cook = item->createCookResult(); if(!cook) return false; |