From a3198234f76847df5407d4baad77458ce03119df Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 24 May 2011 17:19:58 +0000
Subject: [PATCH] fix crash when trying to access incompatible external data

---
 Post/PViewDataGModel.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Post/PViewDataGModel.cpp b/Post/PViewDataGModel.cpp
index 35622352eb..bc26a46e89 100644
--- a/Post/PViewDataGModel.cpp
+++ b/Post/PViewDataGModel.cpp
@@ -697,6 +697,7 @@ bool PViewDataGModel::skipElement(int step, int ent, int ele, bool checkVisibili
   stepData<double> *sd = _steps[step];
   if(!_steps[step]->getNumData()) return true;
   MElement *e = _getElement(step, ent, ele);
+  if(!e) return true;
   if(checkVisibility && !e->getVisibility()) return true;
   if(_type == NodeData){
     for(int i = 0; i < getNumNodes(step, ent, ele); i++)
-- 
GitLab