diff options
author | Harald Vistnes <harald.vistnes@gmail.com> | 2016-06-26 22:35:12 +0200 |
---|---|---|
committer | Paul Lemire <paul.lemire@kdab.com> | 2016-06-28 19:00:54 +0000 |
commit | 9271067145dc4a2b03a2747327144509188a756f (patch) | |
tree | 0b64a2fcd667e335cb4574dc72ff350239ed785b /src/render/frontend | |
parent | 1f957d672edc58e2e157c6813aeb8f8779262399 (diff) |
Sphere: guard against empty points vector.
Change-Id: Ib3a8dc6c8880ea78d132f30bec772680d7cc29be
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/frontend')
-rw-r--r-- | src/render/frontend/sphere.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render/frontend/sphere.cpp b/src/render/frontend/sphere.cpp index 4ff17ea8e..60e414c2e 100644 --- a/src/render/frontend/sphere.cpp +++ b/src/render/frontend/sphere.cpp @@ -163,7 +163,8 @@ Sphere Sphere::fromPoints(const QVector<QVector3D> &points) void Sphere::initializeFromPoints(const QVector<QVector3D> &points) { - constructRitterSphere(*this, points); + if (!points.isEmpty()) + constructRitterSphere(*this, points); } void Sphere::expandToContain(const QVector3D &p) |