Fixed NullPointerException when creating new Polygon from float/double array.