Browse Source

Don't let other controls have access to a dead container.

Jon Watte 10 years ago
parent
commit
842f095bb8
1 changed files with 1 additions and 0 deletions
  1. 1 0
      gameplay/src/Container.cpp

+ 1 - 0
gameplay/src/Container.cpp

@@ -67,6 +67,7 @@ Container::~Container()
     std::vector<Control*>::iterator it;
     std::vector<Control*>::iterator it;
     for (it = _controls.begin(); it < _controls.end(); it++)
     for (it = _controls.begin(); it < _controls.end(); it++)
     {
     {
+        (*it)->_parent = nullptr;
         SAFE_RELEASE((*it));
         SAFE_RELEASE((*it));
     }
     }
     SAFE_RELEASE(_layout);
     SAFE_RELEASE(_layout);