mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-09 20:39:37 +01:00
Check if the ESS singleton is present before accessing it in ItemTemplate's constructor.
This commit is contained in:
parent
6bae38ca23
commit
48fc41e3c6
@ -400,7 +400,11 @@ ItemTemplate::ItemTemplate() {
|
|||||||
_item_sub_sub_type = ItemEnums::ITEM_SUB_SUB_TYPE_NONE;
|
_item_sub_sub_type = ItemEnums::ITEM_SUB_SUB_TYPE_NONE;
|
||||||
_rarity = ItemEnums::ITEM_RARITY_NONE;
|
_rarity = ItemEnums::ITEM_RARITY_NONE;
|
||||||
_armor_type = ItemEnums::ARMOR_TYPE_NONE;
|
_armor_type = ItemEnums::ARMOR_TYPE_NONE;
|
||||||
|
if (ESS::get_singleton()) {
|
||||||
_equip_slot = ESS::get_singleton()->equip_slot_get_count();
|
_equip_slot = ESS::get_singleton()->equip_slot_get_count();
|
||||||
|
} else {
|
||||||
|
_equip_slot = 0;
|
||||||
|
}
|
||||||
_price = 0;
|
_price = 0;
|
||||||
|
|
||||||
_scale_x = 0;
|
_scale_x = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user