From 257062dde3bb232f33fc3c22e29971efde821525 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 20 Mar 2017 20:44:22 +0000
Subject: [PATCH] don't compute mean plane if there are no points

---
 Geo/GFace.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Geo/GFace.cpp b/Geo/GFace.cpp
index f4a558cf9f..66c0d6dbe3 100644
--- a/Geo/GFace.cpp
+++ b/Geo/GFace.cpp
@@ -522,6 +522,8 @@ void GFace::computeMeanPlane(const std::vector<MVertex*> &points)
 
 void GFace::computeMeanPlane(const std::vector<SPoint3> &points)
 {
+  if(points.empty()) return;
+
   // The concept of a mean plane computed in the sense of least
   // squares is fine for plane surfaces(!), but not really the best
   // one for non-plane surfaces. Indeed, imagine a quarter of a circle
-- 
GitLab