Skip to content

Commit

Permalink
Fix actor_menu_item.xml reinitialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Drombeys committed Sep 23, 2024
1 parent 36dec63 commit 7c9759b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/xrGame/ui/UICellItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,14 @@ CUICellItem::~CUICellItem()

void CUICellItem::init()
{
CUIXml uiXml;
uiXml.Load( CONFIG_PATH, UI_PATH, "actor_menu_item.xml" );
static CUIXml uiXml;
static bool is_xml_ready = false;

if (!is_xml_ready)
{
uiXml.Load(CONFIG_PATH, UI_PATH, "actor_menu_item.xml");
is_xml_ready = true;
}

m_text = new CUIStatic();
m_text->SetAutoDelete ( true );
Expand Down

0 comments on commit 7c9759b

Please sign in to comment.