diff options
author | Marius Kintel <marius@kintel.net> | 2012-02-19 12:09:02 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-02-19 12:09:02 (GMT) |
commit | c5703b44077ca6185f7611d6ffba68f4955c1cbd (patch) | |
tree | d427746f36983ea977a84e0d04a04d179592ce7c /src/CGAL_Nef_polyhedron.cc | |
parent | 955e0f1344d772119e2d7af1afb7658df7e8c43e (diff) |
bugfix: Fix crash bug when using zero scale factors. Reported by Alan Cox
Diffstat (limited to 'src/CGAL_Nef_polyhedron.cc')
-rw-r--r-- | src/CGAL_Nef_polyhedron.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/CGAL_Nef_polyhedron.cc b/src/CGAL_Nef_polyhedron.cc index 04783e5..ba298ad 100644 --- a/src/CGAL_Nef_polyhedron.cc +++ b/src/CGAL_Nef_polyhedron.cc @@ -61,6 +61,8 @@ CGAL_Nef_polyhedron &CGAL_Nef_polyhedron::minkowski(const CGAL_Nef_polyhedron &o int CGAL_Nef_polyhedron::weight() const { + if (this->empty()) return 0; + size_t memsize = sizeof(CGAL_Nef_polyhedron); if (this->dim == 2) { memsize += sizeof(CGAL_Nef_polyhedron2) + |