mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-16 18:01:40 +00:00
If there was no source item in a furnace it would cause a segmentation fault.
This commit is contained in:
parent
4af1f2963c
commit
6415528f96
2 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue