Don't call Grid cache updates if the grid is empty.

This commit is contained in:
AlgorithmX2 2014-05-20 09:37:53 -05:00
parent 2cf84989d1
commit 7a3f2dcf5a

View file

@ -199,9 +199,13 @@ public class Grid implements IGrid
public void update()
{
for (IGridCache gc : caches.values())
// are ther any nodes left?
if ( pivot != null )
{
gc.onUpdateTick();
for (IGridCache gc : caches.values())
{
gc.onUpdateTick();
}
}
}