Check if the ESS singleton exists in EquipmentData's constructor.

This commit is contained in:
Relintai 2022-03-17 08:41:22 +01:00
parent 38fc0c402e
commit 87e792b920

View File

@ -50,7 +50,9 @@ Ref<ItemInstance> EquipmentData::get_item(int index) {
} }
EquipmentData::EquipmentData() { EquipmentData::EquipmentData() {
if (ESS::get_singleton()) {
_entries.resize(ESS::get_singleton()->equip_slot_get_count()); _entries.resize(ESS::get_singleton()->equip_slot_get_count());
}
} }
EquipmentData::~EquipmentData() { EquipmentData::~EquipmentData() {