Ndk/World: Fix crash with unused-systems

Former-commit-id: 2425e885d4f93033d3d6f367944ef2893f043223
This commit is contained in:
Lynix 2015-09-26 21:54:34 +02:00
parent fe2e47478e
commit 504452a60b
2 changed files with 8 additions and 1 deletions

View File

@ -136,7 +136,10 @@ namespace Ndk
// And then update systems
for (auto& systemPtr : m_systems)
systemPtr->Update(elapsedTime);
{
if (systemPtr)
systemPtr->Update(elapsedTime);
}
}
inline void World::Invalidate()

View File

@ -132,6 +132,10 @@ namespace Ndk
{
for (auto& system : m_systems)
{
// Ignore non-existent systems
if (!system)
continue;
// L'entité est-elle enregistrée comme faisant partie du système ?
bool partOfSystem = system->HasEntity(entity);