From d2a729bdfa91e2463cfb03e3177147f043ae0dc9 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 19 Oct 2013 17:15:25 -0400 Subject: Ignore malformed polygons diff --git a/src/primitives.cc b/src/primitives.cc index 89c1573..13a6794 100644 --- a/src/primitives.cc +++ b/src/primitives.cc @@ -513,8 +513,12 @@ sphere_next_r2: if (this->paths.toVector().size() == 0) { + if (dd.points.size() <= 2) { // Ignore malformed polygons + delete p; + return NULL; + } dd.paths.push_back(DxfData::Path()); - for (size_t i=0; ipoints.toVector().size(); i++) { + for (size_t i=0; i