Index: FlatteningPathIterator.java =================================================================== --- FlatteningPathIterator.java (revision 441002) +++ FlatteningPathIterator.java (working copy) @@ -114,6 +114,9 @@ if (limit < 0) { throw new IllegalArgumentException("Limit is less then zero"); } + if (path == null) { + throw new NullPointerException("Path is null"); + } this.p = path; this.flatness = flatness; this.flatness2 = flatness * flatness;