mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
fix memory leaks introduced by invalid gettext usage
This commit is contained in:
parent
cd27c8ef5d
commit
98182f6097
14 changed files with 344 additions and 146 deletions
|
@ -105,8 +105,10 @@ void GUIVolumeChange::regenerateGui(v2u32 screensize)
|
|||
{
|
||||
core::rect<s32> rect(0, 0, 120, 20);
|
||||
rect = rect + v2s32(size.X/2-60, size.Y/2-35);
|
||||
Environment->addStaticText(wgettext("Sound Volume: "), rect, false,
|
||||
wchar_t* text = wgettext("Sound Volume: ");
|
||||
Environment->addStaticText(text, rect, false,
|
||||
true, this, ID_soundText1);
|
||||
delete[] text;
|
||||
}
|
||||
{
|
||||
core::rect<s32> rect(0, 0, 30, 20);
|
||||
|
@ -117,8 +119,10 @@ void GUIVolumeChange::regenerateGui(v2u32 screensize)
|
|||
{
|
||||
core::rect<s32> rect(0, 0, 80, 30);
|
||||
rect = rect + v2s32(size.X/2-80/2, size.Y/2+55);
|
||||
wchar_t* text = wgettext("Exit");
|
||||
Environment->addButton(rect, this, ID_soundExitButton,
|
||||
wgettext("Exit"));
|
||||
text);
|
||||
delete[] text;
|
||||
}
|
||||
{
|
||||
core::rect<s32> rect(0, 0, 300, 20);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue