diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/client.cpp | 11 | ||||
-rw-r--r-- | src/resources/beinginfo.cpp | 2 | ||||
-rw-r--r-- | src/resources/spritedef.cpp | 3 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/client.cpp b/src/client.cpp index 5a06267f2..6611d3dcf 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -659,9 +659,6 @@ Client::~Client() ActorSprite::unload(); - delete SpriteReference::Empty; - SpriteReference::Empty = 0; - ResourceManager::deleteInstance(); logger->log1("Quitting8"); @@ -1029,6 +1026,14 @@ int Client::exec() // Read default paths file 'data/paths.xml' paths.init("paths.xml", true); paths.setDefaultValues(getPathsDefaults()); + if (!SpriteReference::Empty) + { + SpriteReference::Empty = new SpriteReference( + paths.getStringValue("spriteErrorFile"), 0); + } + + if (!BeingInfo::unknown) + BeingInfo::unknown = new BeingInfo; Mana::Event event(EVENT_STATECHANGE); event.setInt("newState", STATE_LOAD_DATA); diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp index d6865449e..6b4f57d81 100644 --- a/src/resources/beinginfo.cpp +++ b/src/resources/beinginfo.cpp @@ -29,7 +29,7 @@ #include "debug.h" -BeingInfo *BeingInfo::unknown = new BeingInfo; +BeingInfo *BeingInfo::unknown = 0; Attack *BeingInfo::empty = new Attack(SpriteAction::ATTACK, "", ""); BeingInfo::BeingInfo(): diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index 79e665f4c..b6addba77 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -39,8 +39,7 @@ #include "debug.h" -SpriteReference *SpriteReference::Empty = new SpriteReference( - paths.getStringValue("spriteErrorFile"), 0); +SpriteReference *SpriteReference::Empty = 0; Action *SpriteDef::getAction(std::string action) const { |