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
+4
View File
@@ -198,12 +198,16 @@ public class Grid implements IGrid
} }
public void update() public void update()
{
// are ther any nodes left?
if ( pivot != null )
{ {
for (IGridCache gc : caches.values()) for (IGridCache gc : caches.values())
{ {
gc.onUpdateTick(); gc.onUpdateTick();
} }
} }
}
public Iterable<GridCacheWrapper> getCacheWrappers() public Iterable<GridCacheWrapper> getCacheWrappers()
{ {