From 3bb356d83941e7f200c26ea19b1df4cc493adc01 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 5 May 2010 13:54:48 +0000
Subject: [PATCH] fix crash if surface is incorrect

---
 Geo/GeoInterpolation.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Geo/GeoInterpolation.cpp b/Geo/GeoInterpolation.cpp
index d70eb35e6e..f372cbdd40 100644
--- a/Geo/GeoInterpolation.cpp
+++ b/Geo/GeoInterpolation.cpp
@@ -467,7 +467,7 @@ bool iSRuledSurfaceASphere(Surface *s, SPoint3 &center, double &radius)
       }
     }
   }
-  if (isSphere){
+  if (isSphere && C[0]){
     Vertex *p = C[0]->beg;
     radius = sqrt ((p->Pos.X - center.x())+
                    (p->Pos.Y - center.y())+
-- 
GitLab