diff --git a/Geo/GModelIO.cpp b/Geo/GModelIO.cpp
index f76b910891d718fa80dc06e192e222f77201c79c..9281527f6847b180e62231386d678b02447f9639 100644
--- a/Geo/GModelIO.cpp
+++ b/Geo/GModelIO.cpp
@@ -1,4 +1,4 @@
-// $Id: GModelIO.cpp,v 1.23 2006-08-18 15:13:34 geuzaine Exp $
+// $Id: GModelIO.cpp,v 1.24 2006-08-18 16:54:40 geuzaine Exp $
 //
 // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
 //
@@ -43,6 +43,7 @@ static void storeElementsInEntities(GModel *m,
   std::map<int, std::vector<MElement*> >::const_iterator it = map.begin();
   std::map<int, std::vector<MElement*> >::const_iterator ite = map.end();
   for(; it != ite; ++it){
+    if(!it->second.size()) continue;
     int numEdges = it->second[0]->getNumEdges();
     switch(numEdges){
     case 1: