From 95ce2f224f1cf024a533f7e90b37254f82b9723f Mon Sep 17 00:00:00 2001 From: Relintai Date: Thu, 17 Mar 2022 21:49:14 +0100 Subject: [PATCH] Null check the ESS singleton in Entity's update()/. --- modules/entity_spell_system/entities/entity.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/entity_spell_system/entities/entity.cpp b/modules/entity_spell_system/entities/entity.cpp index ee857f542..a81e4cfb8 100644 --- a/modules/entity_spell_system/entities/entity.cpp +++ b/modules/entity_spell_system/entities/entity.cpp @@ -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)