From e8b4b7f106f6af98bd8e4204b893b1449add2e16 Mon Sep 17 00:00:00 2001 From: bakpakin Date: Sat, 28 Mar 2015 21:03:42 +0800 Subject: [PATCH] Fix small but devestating bug for systems without Entities. --- jojo.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jojo.lua b/jojo.lua index ad701eb..b0becf9 100644 --- a/jojo.lua +++ b/jojo.lua @@ -340,8 +340,10 @@ function World:updateSystem(system, dt) if update then local entities = self.entities local eids = systemEntities[system.id] - for eid in pairs(eids) do - update(entities[eid], dt) + if eids then + for eid in pairs(eids) do + update(entities[eid], dt) + end end end end