소스 검색

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

Jon Watte 10 년 전
부모
커밋
842f095bb8
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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);