Accidental crash when you click on an empty inventory.
This commit is contained in:
parent
f03a3a31a8
commit
fe37aa11df
1 changed files with 1 additions and 0 deletions
|
@ -624,6 +624,7 @@ bool System::use_item(const string& slot_name) {
|
|||
auto& player_combat = world.get<Combat>(level.player);
|
||||
|
||||
if(player_combat.hp >= player_combat.max_hp) return false;
|
||||
if(!inventory.has(slot_name)) return false;
|
||||
|
||||
auto what = inventory.get(slot_name);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue