iter.hasNext();) {
Object next = iter.next();
// I'm unable to reproduce bug #1400, but a user did see it, and
// this instanceof check should prevent it - ST 9/21/11
if(next instanceof AgentSet) {
AgentSet breed = (AgentSet) next;
if (Turtle.class.isAssignableFrom(breed.type())) {
for (Agent a : breed.agents()) {
turtleDrawer.drawTurtle(g, topology, (Turtle) a, patchSize);
turtlesDrawn++;
}
}
}