aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp
index a4b6fe649..33c3b59b3 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -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