Don't call Grid cache updates if the grid is empty.
This commit is contained in:
+6
-2
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user