mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 15:29:55 +00:00
Delete Ogre::OverlaySystem before Ogre::Root
This commit is contained in:
parent
8cebfc411b
commit
1d0ac3b4df
3 changed files with 13 additions and 1 deletions
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "model/doc/document.hpp"
|
||||
#include "model/world/data.hpp"
|
||||
#include "view/render/overlaysystem.hpp"
|
||||
|
||||
CS::Editor::Editor (OgreInit::OgreInit& ogreInit)
|
||||
: mUserSettings (mCfgMgr), mDocumentManager (mCfgMgr), mViewManager (mDocumentManager),
|
||||
|
@ -65,6 +66,11 @@ CS::Editor::Editor (OgreInit::OgreInit& ogreInit)
|
|||
this, SLOT (createNewGame (const boost::filesystem::path&)));
|
||||
}
|
||||
|
||||
CS::Editor::~Editor ()
|
||||
{
|
||||
CSVRender::OverlaySystem::instance().destroy(); // destruct before Ogre::Root
|
||||
}
|
||||
|
||||
void CS::Editor::setupDataFiles (const Files::PathContainer& dataDirs)
|
||||
{
|
||||
for (Files::PathContainer::const_iterator iter = dataDirs.begin(); iter != dataDirs.end(); ++iter)
|
||||
|
|
|
@ -64,6 +64,7 @@ namespace CS
|
|||
public:
|
||||
|
||||
Editor (OgreInit::OgreInit& ogreInit);
|
||||
~Editor ();
|
||||
|
||||
bool makeIPCServer();
|
||||
void connectToIPCServer();
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace CSVRender
|
|||
}
|
||||
|
||||
~OverlaySystem() {
|
||||
delete mOverlaySystem;
|
||||
if(mOverlaySystem) delete mOverlaySystem;
|
||||
}
|
||||
|
||||
OverlaySystem(OverlaySystem const&);
|
||||
|
@ -30,6 +30,11 @@ namespace CSVRender
|
|||
Ogre::OverlaySystem *get() {
|
||||
return mOverlaySystem;
|
||||
}
|
||||
|
||||
void destroy() {
|
||||
delete mOverlaySystem;
|
||||
mOverlaySystem = NULL;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue