bug fix for empty graphs

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2760 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
sjfink 2008-04-15 12:03:50 +00:00
parent 11f7a55b2e
commit fc495cf49e
1 changed files with 4 additions and 2 deletions

View File

@ -100,8 +100,10 @@ public class BFSIterator<T> implements Iterator<T> {
}
}
index = 0;
T current = Q.get(0);
visitChildren(current);
if (Q.size() > 0) {
T current = Q.get(0);
visitChildren(current);
}
}
private void visitChildren(T N) {