summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp2
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;