From faf5de7be824065b9940b0ce493340efebffd84a Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 7 Aug 2006 21:23:06 +0000
Subject: [PATCH] *** empty log message ***

---
 Geo/GModelIO.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Geo/GModelIO.cpp b/Geo/GModelIO.cpp
index dadc841d6b..092cc04114 100644
--- a/Geo/GModelIO.cpp
+++ b/Geo/GModelIO.cpp
@@ -611,8 +611,13 @@ int GModel::readSTL(const std::string &name, double tolerance)
     }
   }
 
-  if(!points.size() || points.size() % 3){
-    Msg(GERROR, "Wrong number of points in STL");
+  if(!points.size()){
+    Msg(GERROR, "No facets found in STL file");
+    return 0;
+  }
+  
+  if(points.size() % 3){
+    Msg(GERROR, "Wrong number of points in STL file");
     return 0;
   }
 
-- 
GitLab