mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Check NULL pointer properly in some new code trying to log new stuff
This commit is contained in:
parent
369177aa80
commit
96b2d1fd29
@ -3045,8 +3045,11 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
||||
player->inventory.getList("craftresult");
|
||||
assert(list);
|
||||
InventoryItem *item = list->getItem(0);
|
||||
std::string itemname = "NULL";
|
||||
if(item)
|
||||
itemname = item->getName();
|
||||
actionstream<<player->getName()<<" crafts "
|
||||
<<item->getName()<<std::endl;
|
||||
<<itemname<<std::endl;
|
||||
}
|
||||
/*
|
||||
If the craftresult is placed on itself, move it to
|
||||
|
Loading…
Reference in New Issue
Block a user