diff --git a/DragonECS.csproj b/DragonECS.csproj
index 129c906..7a5a4c7 100644
--- a/DragonECS.csproj
+++ b/DragonECS.csproj
@@ -10,7 +10,7 @@
DCFApixels.DragonECS
DragonECS
- 0.8.39
+ 0.8.40
DCFApixels
ECS Framework for Game Engines with C# and .Net Platform
DCFApixels
diff --git a/package.json b/package.json
index b811349..9e09780 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
"displayName": "DragonECS",
"description": "C# Entity Component System Framework",
"unity": "2020.3",
- "version": "0.8.39",
+ "version": "0.8.40",
"repository": {
"type": "git",
"url": "https://github.com/DCFApixels/DragonECS.git"
diff --git a/src/EcsWorld.cs b/src/EcsWorld.cs
index 8e63f57..515a0fd 100644
--- a/src/EcsWorld.cs
+++ b/src/EcsWorld.cs
@@ -553,9 +553,12 @@ namespace DCFApixels.DragonECS
}
for (int i = 0; i < _groups.Count; i++)
{
- if (_groups[i].TryGetTarget(out EcsGroup group) && group.IsReleased)
+ if (_groups[i].TryGetTarget(out EcsGroup group))
{
- group.OnReleaseDelEntityBuffer_Internal(buffer);
+ if(group.IsReleased)
+ {
+ group.OnReleaseDelEntityBuffer_Internal(buffer);
+ }
}
else
{