mirror of
				https://github.com/DarkflameUniverse/DarkflameServer.git
				synced 2025-10-31 04:32:06 +00:00 
			
		
		
		
	fix: zero out component in destructor (#1863)
This commit is contained in:
		| @@ -175,8 +175,11 @@ Entity::~Entity() { | ||||
| 	CancelAllTimers(); | ||||
| 	CancelCallbackTimers(); | ||||
|  | ||||
| 	for (const auto& component : m_Components | std::views::values) { | ||||
| 		if (component) delete component; | ||||
| 	for (auto& component : m_Components | std::views::values) { | ||||
| 		if (component) { | ||||
| 			delete component; | ||||
| 			component = nullptr; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	for (auto* const child : m_ChildEntities) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 David Markowitz
					David Markowitz