mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 09:23: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:
parent
420e611a4b
commit
21b8456453
2 changed files with 3 additions and 2 deletions
|
@ -13,6 +13,7 @@ using namespace OEngine::Render;
|
||||||
|
|
||||||
void OgreRenderer::cleanup()
|
void OgreRenderer::cleanup()
|
||||||
{
|
{
|
||||||
|
if (mFader)
|
||||||
delete mFader;
|
delete mFader;
|
||||||
|
|
||||||
if(mRoot)
|
if(mRoot)
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace Render
|
||||||
|
|
||||||
public:
|
public:
|
||||||
OgreRenderer()
|
OgreRenderer()
|
||||||
: mRoot(NULL), mWindow(NULL), mScene(NULL) {}
|
: mRoot(NULL), mWindow(NULL), mScene(NULL), mFader(NULL) {}
|
||||||
~OgreRenderer() { cleanup(); }
|
~OgreRenderer() { cleanup(); }
|
||||||
|
|
||||||
/** Configure the renderer. This will load configuration files and
|
/** Configure the renderer. This will load configuration files and
|
||||||
|
|
Loading…
Reference in a new issue