Fixed use of null object.

Identified by clang -fsanitize=null, it was a
copy-pasto newLines->newPolys.  Thanks to David Gobbi
and David Cole for pointing the correct solution.

Change-Id: I10efa32d3f6c96c00f54af42779f37fe4aa9326f
Merge topic 'sanitize-null' into master

014c51a2 Fixed use of null object.