Просмотр исходного кода

Bug with destroying GameObjects

Marko Pintera 12 лет назад
Родитель
Сommit
92a3261371
2 измененных файлов с 2 добавлено и 3 удалено
  1. 2 2
      CamelotCore/Include/CmGameObjectHandle.h
  2. 0 1
      TreeView.txt

+ 2 - 2
CamelotCore/Include/CmGameObjectHandle.h

@@ -89,8 +89,8 @@ namespace CamelotFramework
 			std::shared_ptr<GameObjectInstanceData> instanceData = mData->mPtr;
 			mData->mPtr = nullptr;
 
-			if(mData->mPtr != nullptr)
-				mData->mPtr->object = nullptr;
+			if(instanceData != nullptr)
+				instanceData->object = nullptr;
 		}
 
 		std::shared_ptr<GameObjectHandleData> mData;

+ 0 - 1
TreeView.txt

@@ -1,6 +1,5 @@
 TODO:
  - Callback on tree item select
- - when update() deletes elements it won't remove them from mAutoExpandedElements or mMouseOverDragElement.
  - Context menu with rename/copy/paste/duplicate
  - Delete with Undo/Redo support
  - Support for icons next to tree elements