From d3d284256c694a4239465f88a40c5355bb0e5440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20L=C3=BCbe=C3=9F?= Date: Sun, 8 Jan 2023 20:29:06 +0100 Subject: [PATCH] Fixed WorldEnumerator crashes if one of the components doesn't exist --- GlitchyEngine/src/World/WorldEnumerator.bf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GlitchyEngine/src/World/WorldEnumerator.bf b/GlitchyEngine/src/World/WorldEnumerator.bf index e328b55..c39b7da 100644 --- a/GlitchyEngine/src/World/WorldEnumerator.bf +++ b/GlitchyEngine/src/World/WorldEnumerator.bf @@ -34,11 +34,13 @@ namespace GlitchyEngine.World } else { + // One of the components isn't registered in the world thus there can't be any entity with this component and we don't need to enumerate... #if GE_WORLD_ENUMERATOR_UNREGISTERED_COMPONENT_IS_WARNING Log.EngineLogger.Warning($"Queried component of type \"{type}\" is not registered for this world. The query will never return any results."); #endif DeleteAndNullify!(_bitMask); _endEntry = _currentEntry; + break; } } }