if(item)
{
- if(g_settings.getBool("creative_mode") == false)
+ InventoryList *ilist = player->inventory.getList("main");
+ if(ilist != NULL)
{
- InventoryList *ilist = player->inventory.getList("main");
- if(ilist != NULL)
+ if(g_settings.getBool("creative_mode") == false)
{
// Skip if inventory has no free space
if(ilist->getUsedSlots() == ilist->getSize())
ilist->addItem(item);
UpdateCrafting(player->peer_id);
SendInventory(player->peer_id);
-
- // Remove object from environment
- obj->m_removed = true;
}
+
+ // Remove object from environment
+ obj->m_removed = true;
}
}
else