Fix a crash when running tests.

This commit is contained in:
Relintai 2022-03-16 18:33:44 +01:00
parent ced4ae75a5
commit e2b43374d0

View File

@ -5974,7 +5974,11 @@ Entity::Entity() {
//_action_bar_profile.instance();
_actionbar_locked = false;
_stats.resize(ESS::get_singleton()->stat_get_count());
ESS* ess_singleton = ESS::get_singleton();
if (ess_singleton) {
_stats.resize(ess_singleton->stat_get_count());
}
_sai_state = EntityEnums::AI_STATE_OFF;
_sai_state_stored = EntityEnums::AI_STATE_OFF;
@ -5988,8 +5992,10 @@ Entity::Entity() {
_s_pet_formation_index = 0;
_s_pet_ai_state = EntityEnums::AI_STATE_OFF;
_s_equipment.resize(ESS::get_singleton()->equip_slot_get_count());
_c_equipment.resize(ESS::get_singleton()->equip_slot_get_count());
if (ess_singleton) {
_s_equipment.resize(ess_singleton->equip_slot_get_count());
_c_equipment.resize(ess_singleton->equip_slot_get_count());
}
SET_RPC_REMOTE("csend_request_rank_increase");
SET_RPC_REMOTE("csend_request_rank_decrease");