mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Fixed null pointer dereference errors found by cppcheck
This commit is contained in:
parent
789c88509c
commit
ae561d705f
2 changed files with 5 additions and 4 deletions
|
@ -4109,7 +4109,7 @@ void Server::UpdateCrafting(u16 peer_id)
|
|||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue