summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-18 02:51:48 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-18 02:51:48 +0300
commitaf90f5ef81c95cdec378377c3100a4417e0a1708 (patch)
treea700421e464e790216580e550decf42956ad5de6 /src
parentf6eb325bae9ae993c59bd0b282aef8707c7409f7 (diff)
downloadmv-af90f5ef81c95cdec378377c3100a4417e0a1708.tar.gz
mv-af90f5ef81c95cdec378377c3100a4417e0a1708.tar.bz2
mv-af90f5ef81c95cdec378377c3100a4417e0a1708.tar.xz
mv-af90f5ef81c95cdec378377c3100a4417e0a1708.zip
Fix some missing initialisations and memory leakss.
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp3
-rw-r--r--src/defaults.cpp2
-rw-r--r--src/gui/palette.h10
-rw-r--r--src/map.cpp3
4 files changed, 16 insertions, 2 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 7f6e37aa1..5a06267f2 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -659,6 +659,9 @@ Client::~Client()
ActorSprite::unload();
+ delete SpriteReference::Empty;
+ SpriteReference::Empty = 0;
+
ResourceManager::deleteInstance();
logger->log1("Quitting8");
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 3f8a97340..ad908ad78 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -228,7 +228,7 @@ DefaultsData* getBrandingDefaults()
AddDEF(brandingData, "appShort", "mana");
AddDEF(brandingData, "defaultUpdateHost", "");
AddDEF(brandingData, "helpPath", "");
- AddDEF(brandingData, "onlineServerList", "");
+// AddDEF(brandingData, "onlineServerList", "");
AddDEF(brandingData, "theme", "");
AddDEF(brandingData, "font", "fonts/dejavusans.ttf");
AddDEF(brandingData, "boldFont", "fonts/dejavusans-bold.ttf");
diff --git a/src/gui/palette.h b/src/gui/palette.h
index 4a48bd32d..f89b31fca 100644
--- a/src/gui/palette.h
+++ b/src/gui/palette.h
@@ -155,6 +155,16 @@ class Palette
struct ColorElem
{
+ ColorElem()
+ {
+ type = 0;
+ text = "";
+ ch = 0;
+ gradientIndex = 0;
+ delay = 0;
+ committedDelay = 0;
+ }
+
int type;
gcn::Color color;
gcn::Color testColor;
diff --git a/src/map.cpp b/src/map.cpp
index f9750f217..f8c4e007e 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -621,7 +621,8 @@ Map::Map(int width, int height, int tileWidth, int tileHeight):
mDrawX(-1),
mDrawY(-1),
mDrawScrollX(-1),
- mDrawScrollY(-1)
+ mDrawScrollY(-1),
+ mRedrawMap(true)
{
const int size = mWidth * mHeight;