From e76c57d74775a654ffb2cec60a03f5196d90eff1 Mon Sep 17 00:00:00 2001 From: Tobias Loose Date: Wed, 20 Nov 2013 12:56:33 +0100 Subject: [PATCH] Fix some valgrind memcheck warnings. However there remains one... ... within the threaded texture cache. Once it is resized, some textures in GetQuad(...) (WCachedResource.cpp:102/103) have uninitialized widths/heights. --- projects/mtg/src/GameOptions.cpp | 7 ++++--- projects/mtg/src/GameStateMenu.cpp | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/projects/mtg/src/GameOptions.cpp b/projects/mtg/src/GameOptions.cpp index 18e395760..b82265623 100644 --- a/projects/mtg/src/GameOptions.cpp +++ b/projects/mtg/src/GameOptions.cpp @@ -1188,10 +1188,11 @@ bool GameOptionKeyBindings::read(string input) iss.get(*(s.rdbuf()), ','); iss.get(); - LocalKeySym local; - char sep; - u32 button; + LocalKeySym local = 0; + char sep = 0; + u32 button = 0; s >> local >> sep >> button; + if (':' != sep) return false; assoc.push_back(make_pair(local, u32_to_button(button))); diff --git a/projects/mtg/src/GameStateMenu.cpp b/projects/mtg/src/GameStateMenu.cpp index 11327ce83..b6df5f2f8 100644 --- a/projects/mtg/src/GameStateMenu.cpp +++ b/projects/mtg/src/GameStateMenu.cpp @@ -65,6 +65,7 @@ GameStateMenu::GameStateMenu(GameApp* parent) : scroller = NULL; langChoices = false; primitivesLoadCounter = -1; + bgTexture = NULL; } GameStateMenu::~GameStateMenu()