Logger is no longer destroyed with the video driver, reported by lzy0168
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1164 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
0add053f81
commit
24100d9f48
|
@ -24,6 +24,18 @@ CIrrDeviceStub::CIrrDeviceStub(const char* version, IEventReceiver* recv)
|
|||
{
|
||||
Timer = new CTimer();
|
||||
Logger = new CLogger(UserReceiver);
|
||||
if (os::Printer::Logger)
|
||||
{
|
||||
os::Printer::Logger->grab();
|
||||
Logger = (CLogger*)os::Printer::Logger;
|
||||
Logger->setReceiver(UserReceiver);
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger = new CLogger(UserReceiver);
|
||||
os::Printer::Logger = Logger;
|
||||
}
|
||||
|
||||
os::Printer::Logger = Logger;
|
||||
|
||||
core::stringc s = "Irrlicht Engine version ";
|
||||
|
@ -60,7 +72,10 @@ CIrrDeviceStub::~CIrrDeviceStub()
|
|||
|
||||
Timer->drop();
|
||||
|
||||
Logger->drop();
|
||||
if (Logger->drop())
|
||||
os::Printer::Logger = 0;
|
||||
|
||||
Logger = 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue