summaryrefslogtreecommitdiff
path: root/src/content_nodemeta.cpp
diff options
context:
space:
mode:
authorJacobF <queatz@gmail.com>2011-08-30 11:38:53 -0400
committerJacobF <queatz@gmail.com>2011-08-30 11:38:53 -0400
commit6415528f968f950cb6b4d6139e336f60a0260515 (patch)
tree0ff5e80574669983e66aa7981e538cab7cabf200 /src/content_nodemeta.cpp
parent4af1f2963c54300b168deb0eada25ecfb8822d1b (diff)
downloadminetest-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/content_nodemeta.cpp')
-rw-r--r--src/content_nodemeta.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/content_nodemeta.cpp b/src/content_nodemeta.cpp
index d29eea661..e8f1e197e 100644
--- a/src/content_nodemeta.cpp
+++ b/src/content_nodemeta.cpp
@@ -293,7 +293,7 @@ bool FurnaceNodeMetadata::step(float dtime)
If there is no source item or source item is not cookable,
or furnace became overloaded, stop loop.
*/
- if((m_fuel_time < m_fuel_totaltime || dst_list->roomForCookedItem(src_item) == false)
+ if((m_fuel_time < m_fuel_totaltime || (src_item && dst_list->roomForCookedItem(src_item) == false))
&& (src_item == NULL || m_src_totaltime < 0.001))
{
m_step_accumulator = 0;