Ndk/World: Fix crash with unused-systems
Former-commit-id: 2425e885d4f93033d3d6f367944ef2893f043223
This commit is contained in:
parent
fe2e47478e
commit
504452a60b
|
|
@ -136,7 +136,10 @@ namespace Ndk
|
||||||
|
|
||||||
// And then update systems
|
// And then update systems
|
||||||
for (auto& systemPtr : m_systems)
|
for (auto& systemPtr : m_systems)
|
||||||
systemPtr->Update(elapsedTime);
|
{
|
||||||
|
if (systemPtr)
|
||||||
|
systemPtr->Update(elapsedTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void World::Invalidate()
|
inline void World::Invalidate()
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,10 @@ namespace Ndk
|
||||||
{
|
{
|
||||||
for (auto& system : m_systems)
|
for (auto& system : m_systems)
|
||||||
{
|
{
|
||||||
|
// Ignore non-existent systems
|
||||||
|
if (!system)
|
||||||
|
continue;
|
||||||
|
|
||||||
// L'entité est-elle enregistrée comme faisant partie du système ?
|
// L'entité est-elle enregistrée comme faisant partie du système ?
|
||||||
bool partOfSystem = system->HasEntity(entity);
|
bool partOfSystem = system->HasEntity(entity);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue