mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Fix intlGUIEditBox leak and uninitialized value in Mapper (reported by valgrind)
This commit is contained in:
parent
1c408c4f1d
commit
6c0c27f662
2 changed files with 9 additions and 6 deletions
|
@ -1020,6 +1020,7 @@ void GUIFormSpecMenu::parseSimpleField(parserData* data,
|
|||
if (g_settings->getBool("freetype")) {
|
||||
e = (gui::IGUIElement *) new gui::intlGUIEditBox(spec.fdefault.c_str(),
|
||||
true, Environment, this, spec.fid, rect);
|
||||
e->drop();
|
||||
} else {
|
||||
#else
|
||||
{
|
||||
|
@ -1119,6 +1120,7 @@ void GUIFormSpecMenu::parseTextArea(parserData* data,
|
|||
if (g_settings->getBool("freetype")) {
|
||||
e = (gui::IGUIEditBox *) new gui::intlGUIEditBox(spec.fdefault.c_str(),
|
||||
true, Environment, this, spec.fid, rect);
|
||||
e->drop();
|
||||
} else {
|
||||
#else
|
||||
{
|
||||
|
|
|
@ -224,12 +224,13 @@ Mapper::Mapper(IrrlichtDevice *device, Client *client)
|
|||
|
||||
// Initialize minimap data
|
||||
data = new MinimapData;
|
||||
data->mode = MINIMAP_MODE_OFF;
|
||||
data->is_radar = false;
|
||||
data->map_invalidated = true;
|
||||
data->heightmap_image = NULL;
|
||||
data->minimap_image = NULL;
|
||||
data->texture = NULL;
|
||||
data->mode = MINIMAP_MODE_OFF;
|
||||
data->is_radar = false;
|
||||
data->map_invalidated = true;
|
||||
data->heightmap_image = NULL;
|
||||
data->minimap_image = NULL;
|
||||
data->texture = NULL;
|
||||
data->heightmap_texture = NULL;
|
||||
data->minimap_shape_round = g_settings->getBool("minimap_shape_round");
|
||||
|
||||
// Get round minimap textures
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue