File tree Expand file tree Collapse file tree 2 files changed +11
-26
lines changed
Shared/data/MTA San Andreas/MTA/locale/en_US Expand file tree Collapse file tree 2 files changed +11
-26
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ CNewsBrowser::CNewsBrowser()
2626 m_pWindow = NULL ;
2727 m_pTabPanel = NULL ;
2828 m_pButtonOK = NULL ;
29+ m_pButtonNewsLink = NULL ;
2930}
3031
3132// //////////////////////////////////////////////////
@@ -199,31 +200,15 @@ void CNewsBrowser::CreateGUI()
199200// //////////////////////////////////////////////////
200201void CNewsBrowser::DestroyGUI ()
201202{
202- // Destroy
203- for (uint i = 0 ; i < m_TabList.size (); i++)
204- {
205- CGUITab* pTab = m_TabList[i];
206- if (pTab)
207- delete pTab;
208- }
209- m_TabList.clear ();
210- for (uint i = 0 ; i < m_TabContentList.size (); i++)
211- {
212- CGUIWindow* pWindow = m_TabContentList[i];
213- if (pWindow)
214- {
215- CGUIElement* m_pScrollPane = pWindow->GetParent ();
216- if (m_pScrollPane)
217- {
218- delete m_pScrollPane;
219- }
220- delete pWindow;
221- }
222- }
223- m_TabContentList.clear ();
224- SAFE_DELETE (m_pTabPanel);
203+ // Clean up the main UI elements in reverse order of creation
204+ SAFE_DELETE (m_pTabPanel); // This will destroy all tabs and their children
225205 SAFE_DELETE (m_pButtonOK);
206+ SAFE_DELETE (m_pButtonNewsLink);
226207 SAFE_DELETE (m_pWindow);
208+
209+ // Clear the lists after the GUI objects are destroyed
210+ m_TabList.clear ();
211+ m_TabContentList.clear ();
227212}
228213
229214// //////////////////////////////////////////////////
Original file line number Diff line number Diff line change 88msgstr ""
99"Project-Id-Version : MTA San Andreas 1.x\n "
1010"Report-Msgid-Bugs-To : \n "
11- "POT-Creation-Date : 2025-09-05 13:26 +0000\n "
11+ "POT-Creation-Date : 2025-09-10 23:59 +0000\n "
1212"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
1313"Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
1414"Language-Team : LANGUAGE <LL@li.org>\n "
@@ -2808,12 +2808,12 @@ msgid ""
28082808msgstr ""
28092809
28102810#. Create the window
2811- #: Client/core/CNewsBrowser.cpp:153
2811+ #: Client/core/CNewsBrowser.cpp:154
28122812msgid "NEWS"
28132813msgstr ""
28142814
28152815#. News link
2816- #: Client/core/CNewsBrowser.cpp:171 Client/core/CNewsBrowser.cpp:172
2816+ #: Client/core/CNewsBrowser.cpp:172 Client/core/CNewsBrowser.cpp:173
28172817msgid "Visit latest news article"
28182818msgstr ""
28192819
You can’t perform that action at this time.
0 commit comments