Hello SetText Error null

Old
void CUIMessageBox::SetText(const std::string& szMsg) { m_pText_Message->SetString(szMsg); }
void CUIMessageBox::SetTitle(const std::string& szTitle) { m_pText_Title->SetString(szTitle); }
New now
void CUIMessageBox::SetText(const std::string& szMsg) { if (NULL == m_pText_Message) return;
m_pText_Message->SetString(szMsg);
}
void CUIMessageBox::SetTitle(const std::string& szTitle) { if (NULL == m_pText_Title) return;
m_pText_Title->SetString(szTitle);
}
Is it true? -now thanks <3
What is the question exactly ?,
@onurcanbektas bang problem
You might look into why the control's not loaded here, because that seems like more of a problem than the fact it's crashing.
@twostars yes Can I get a skype address
If m_pText_Message is nullptr it means the control's not loaded, which means either the UI needs updating or it's being used for a specialisation of a messagebox UI that isn't named the same.
You don't show a callstack here so I can't tell which instance is theoretically being used here, and I don't recall if there were changes in the naming for this UI, but it should be fairly straightforward to find out. Load up the relevant UI in the UI editor and check what it's called, or just set a breakpoint there & check the names of the loaded children.
Checking if it's set stops it from crashing, but a messagebox without a message kind've defeats the purpose of said messagebox, so you should really find out why the control isn't attached here.