@@ -483,25 +483,31 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
483
483
{
484
484
core::rect<s32> rect (0 , 0 , 390 , 20 );
485
485
rect += m_topleft_client + v2s32 (50 , 10 );
486
- Environment->addStaticText (wgettext (" Favorites:" ),
486
+ wchar_t * text = wgettext (" Favorites:" );
487
+ Environment->addStaticText (text,
487
488
rect, false , true , this , GUI_ID_SERVERLIST_TITLE);
489
+ delete[] text;
488
490
}
489
491
} else {
490
492
m_data->servers = ServerList::getOnline ();
491
493
{
492
494
core::rect<s32> rect (0 , 0 , 390 , 20 );
493
495
rect += m_topleft_client + v2s32 (50 , 10 );
494
- Environment->addStaticText (wgettext (" Public Server List:" ),
496
+ wchar_t * text = wgettext (" Public Server List:" );
497
+ Environment->addStaticText (text,
495
498
rect, false , true , this , GUI_ID_SERVERLIST_TITLE);
499
+ delete[] text;
496
500
}
497
501
}
498
502
#else
499
503
m_data->servers = ServerList::getLocal ();
500
504
{
501
505
core::rect<s32> rect (0 , 0 , 390 , 20 );
502
506
rect += m_topleft_client + v2s32 (50 , 10 );
503
- Environment->addStaticText (wgettext (" Favorites:" ),
507
+ wchar_t * text = wgettext (" Favorites:" );
508
+ Environment->addStaticText (text,
504
509
rect, false , true , this , GUI_ID_SERVERLIST_TITLE);
510
+ delete[] text;
505
511
}
506
512
#endif
507
513
updateGuiServerList ();
@@ -1372,9 +1378,11 @@ bool GUIMainMenu::OnEvent(const SEvent& event)
1372
1378
readInput (&cur);
1373
1379
if (getTab () == TAB_MULTIPLAYER && cur.address == L" " )
1374
1380
{
1381
+ wchar_t * text = wgettext (" Address required." );
1375
1382
(new GUIMessageMenu (env, parent, -1 , menumgr,
1376
- wgettext ( " Address required. " ) )
1383
+ text )
1377
1384
)->drop ();
1385
+ delete[] text;
1378
1386
return true ;
1379
1387
}
1380
1388
acceptInput ();
0 commit comments