Null check the ESS singleton in Entity's update()/.

This commit is contained in:
Relintai 2022-03-17 21:49:14 +01:00
parent 678ee45c4f
commit 95ce2f224f

View File

@ -5630,6 +5630,7 @@ void Entity::update(float delta) {
}
}
if (ESS::get_singleton()) {
for (int i = 0; i < ESS::get_singleton()->stat_get_count(); ++i) {
if (stat_get_dirty(i)) {
ssend_stat(i, stat_gets_current(i));
@ -5637,6 +5638,7 @@ void Entity::update(float delta) {
stat_set_dirty(i, false);
}
}
}
if (_s_entity_controller == EntityEnums::ENITIY_CONTROLLER_AI && _s_ai.is_valid() && _s_ai->get_enabled()) {
if (_s_pet_owner)