bug: enemie movement sometimes deref nullptr when calling get_pos()
fixed level gen
This commit is contained in:
@ -122,7 +122,7 @@ long_result player_base::interpret_command(level *lvl, game_command cmd) {
|
||||
lvl->get_elist());
|
||||
auto res = attack((character *)tmp);
|
||||
|
||||
if (tmp->is_dead())
|
||||
if (tmp != nullptr && tmp->is_dead())
|
||||
tmp->dies(lvl, this);
|
||||
|
||||
return res;
|
||||
|
Reference in New Issue
Block a user