- attempt to cfix mysterious exit crash

This commit is contained in:
Mark Vejvoda
2010-09-09 00:05:12 +00:00
parent 17f61a808e
commit b31ad16b21
4 changed files with 12 additions and 6 deletions

View File

@@ -46,6 +46,10 @@ GraphicComponent::GraphicComponent(std::string containerName, std::string objNam
editable= true;
}
void GraphicComponent::clearRegisteredComponents() {
GraphicComponent::registeredGraphicComponentList.clear();
}
void GraphicComponent::registerGraphicComponent(std::string containerName, std::string objName) {
instanceName = objName;
registeredGraphicComponentList[containerName][objName] = this;

View File

@@ -57,6 +57,7 @@ public:
GraphicComponent(std::string containerName="", std::string objName="");
virtual ~GraphicComponent(){}
static void clearRegisteredComponents();
void registerGraphicComponent(std::string containerName, std::string objName);
static GraphicComponent * findRegisteredComponent(std::string containerName, std::string objName);
static void applyAllCustomProperties(std::string containerName);

View File

@@ -32,6 +32,7 @@
#include "menu_state_masterserver.h"
#include "checksum.h"
#include <algorithm>
#include "sound_renderer.h"
#include "leak_dumper.h"
#ifndef WIN32
@@ -937,13 +938,14 @@ int glestMain(int argc, char** argv){
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
//SoundRenderer &soundRenderer= SoundRenderer::getInstance();
//soundRenderer.stopAllSounds();
delete mainWindow;
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
GraphicComponent::clearRegisteredComponents();
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
//SystemFlags::Close();
return 0;

View File

@@ -89,10 +89,9 @@ SoundRenderer::~SoundRenderer(){
stopAllSounds();
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
delete soundPlayer;
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);
soundPlayer = NULL;
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s %d]\n",__FILE__,__FUNCTION__,__LINE__);