Commit b589323a authored by cutealien's avatar cutealien

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-e03cc46cb475
parent 1e234122
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment