Drop some objects in reverse order of grabbing in CGUIEnvironment.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4237 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
1e2341226a
commit
b589323a49
|
@ -112,12 +112,6 @@ CGUIEnvironment::~CGUIEnvironment()
|
|||
Hovered = 0;
|
||||
}
|
||||
|
||||
if (Driver)
|
||||
{
|
||||
Driver->drop();
|
||||
Driver = 0;
|
||||
}
|
||||
|
||||
if (Focus)
|
||||
{
|
||||
Focus->drop();
|
||||
|
@ -130,18 +124,6 @@ CGUIEnvironment::~CGUIEnvironment()
|
|||
ToolTip.Element = 0;
|
||||
}
|
||||
|
||||
if (FileSystem)
|
||||
{
|
||||
FileSystem->drop();
|
||||
FileSystem = 0;
|
||||
}
|
||||
|
||||
if (Operator)
|
||||
{
|
||||
Operator->drop();
|
||||
Operator = 0;
|
||||
}
|
||||
|
||||
// drop skin
|
||||
if (CurrentSkin)
|
||||
{
|
||||
|
@ -163,6 +145,24 @@ CGUIEnvironment::~CGUIEnvironment()
|
|||
// remove all factories
|
||||
for (i=0; i<GUIElementFactoryList.size(); ++i)
|
||||
GUIElementFactoryList[i]->drop();
|
||||
|
||||
if (Operator)
|
||||
{
|
||||
Operator->drop();
|
||||
Operator = 0;
|
||||
}
|
||||
|
||||
if (FileSystem)
|
||||
{
|
||||
FileSystem->drop();
|
||||
FileSystem = 0;
|
||||
}
|
||||
|
||||
if (Driver)
|
||||
{
|
||||
Driver->drop();
|
||||
Driver = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue