Skip to content

Commit

Permalink
Fix intlGUIEditBox leak and uninitialized value in Mapper (reported b…
Browse files Browse the repository at this point in the history
…y valgrind)
  • Loading branch information
kahrl committed Aug 10, 2015
1 parent 1c408c4 commit 6c0c27f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/guiFormSpecMenu.cpp
Expand Up @@ -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
{
Expand Down Expand Up @@ -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
{
Expand Down
13 changes: 7 additions & 6 deletions src/minimap.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 6c0c27f

Please sign in to comment.