From b589323a49f95d717309c2f68dccdc64bc4c8204 Mon Sep 17 00:00:00 2001 From: cutealien Date: Wed, 11 Jul 2012 17:46:32 +0000 Subject: [PATCH] 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 --- source/Irrlicht/CGUIEnvironment.cpp | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/source/Irrlicht/CGUIEnvironment.cpp b/source/Irrlicht/CGUIEnvironment.cpp index fde2d909..5ad489bd 100644 --- a/source/Irrlicht/CGUIEnvironment.cpp +++ b/source/Irrlicht/CGUIEnvironment.cpp @@ -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; idrop(); + + if (Operator) + { + Operator->drop(); + Operator = 0; + } + + if (FileSystem) + { + FileSystem->drop(); + FileSystem = 0; + } + + if (Driver) + { + Driver->drop(); + Driver = 0; + } }