From b60b67d31cf4d2be90bbd00b6ac52cbeafbd7bd7 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 9 Jul 2013 04:26:42 +0000
Subject: [PATCH] fix crash

---
 Mesh/meshGFaceOptimize.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Mesh/meshGFaceOptimize.cpp b/Mesh/meshGFaceOptimize.cpp
index cb8ecf7597..83c18d62ed 100644
--- a/Mesh/meshGFaceOptimize.cpp
+++ b/Mesh/meshGFaceOptimize.cpp
@@ -2137,7 +2137,7 @@ void _relocateVertex(GFace *gf, MVertex *ver,
 
   if(ver->onWhat()->dim() != 2) return;
   MFaceVertex *fv = dynamic_cast<MFaceVertex*>(ver);
-  if(fv->bl_data) return;
+  if(fv && fv->bl_data) return;
 
   double initu,initv;
   ver->getParameter(0, initu);
-- 
GitLab