Browse Source

fixed controls removing from Container

Andrew Karpushin 12 years ago
parent
commit
a72317c2a0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gameplay/src/Container.cpp

+ 1 - 1
gameplay/src/Container.cpp

@@ -295,8 +295,8 @@ void Container::removeControl(unsigned int index)
     GP_ASSERT(index < _controls.size());
 
     std::vector<Control*>::iterator it = _controls.begin() + index;
-    _controls.erase(it);
     Control* control = *it;
+    _controls.erase(it);
     control->_parent = NULL;
     SAFE_RELEASE(control);
 }