i.atEnd()==false; i++)
{
ServerActiveObject* obj = i.getNode()->getValue();
- u16 id = i.getNode()->getKey();
- v3f objectpos = obj->getBasePosition();
// This shouldn't happen but check it
if(obj == NULL)
continue;
}
+ u16 id = i.getNode()->getKey();
+ v3f objectpos = obj->getBasePosition();
+
// The block in which the object resides in
v3s16 blockpos_o = getNodeBlockPos(floatToInt(objectpos, BS));
-
+
// If block is active, don't remove
if(m_active_blocks.contains(blockpos_o))
continue;
InventoryList *clist = player->inventory.getList("craft");
InventoryList *rlist = player->inventory.getList("craftresult");
- if(rlist->getUsedSlots() == 0)
+ if(rlist && rlist->getUsedSlots() == 0)
player->craftresult_is_preview = true;
if(rlist && player->craftresult_is_preview)