1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 06:53:52 +00:00

fixed a double-free that can happen if OpenMW exits prematurely (when OgreRenderer is deleted before CreateScene() was called)

This commit is contained in:
scrawl 2012-02-20 21:09:08 +01:00
parent 420e611a4b
commit 21b8456453
2 changed files with 3 additions and 2 deletions

View file

@ -13,6 +13,7 @@ using namespace OEngine::Render;
void OgreRenderer::cleanup()
{
if (mFader)
delete mFader;
if(mRoot)

View file

@ -32,7 +32,7 @@ namespace Render
public:
OgreRenderer()
: mRoot(NULL), mWindow(NULL), mScene(NULL) {}
: mRoot(NULL), mWindow(NULL), mScene(NULL), mFader(NULL) {}
~OgreRenderer() { cleanup(); }
/** Configure the renderer. This will load configuration files and