From fc8cf091e6cc4ca5e86266f2e894535f2e16cb6d Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 14 Nov 2006 17:04:55 +0000
Subject: [PATCH] occ work

---
 Graphics/Mesh.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Graphics/Mesh.cpp b/Graphics/Mesh.cpp
index d8fa48c707..4d9c1116bf 100644
--- a/Graphics/Mesh.cpp
+++ b/Graphics/Mesh.cpp
@@ -1,4 +1,4 @@
-// $Id: Mesh.cpp,v 1.188 2006-11-14 15:21:03 geuzaine Exp $
+// $Id: Mesh.cpp,v 1.189 2006-11-14 17:04:55 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -88,7 +88,7 @@ static unsigned int getColorByElement(MElement *ele)
   else{ // by entity
     for(int i = 0; i < ele->getNumVertices(); i++){
       GEntity *e = ele->getVertex(i)->onWhat();
-      if(e->dim() == ele->getDim()) 
+      if(e && (e->dim() == ele->getDim()))
 	return getColorByEntity(e);
     }
   }
-- 
GitLab