From 6415528f968f950cb6b4d6139e336f60a0260515 Mon Sep 17 00:00:00 2001 From: JacobF Date: Tue, 30 Aug 2011 11:38:53 -0400 Subject: If there was no source item in a furnace it would cause a segmentation fault. --- src/inventory.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/inventory.cpp') 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; -- cgit v1.2.3