diff options
| -rw-r--r-- | src/import.cc | 13 | 
1 files changed, 9 insertions, 4 deletions
| diff --git a/src/import.cc b/src/import.cc index ba42b0a..40468cc 100644 --- a/src/import.cc +++ b/src/import.cc @@ -257,10 +257,15 @@ PolySet *ImportNode::evaluate_polyset(class PolySetEvaluator *) const  #ifdef ENABLE_CGAL  		CGAL_Polyhedron poly;  		std::ifstream file(this->filename.c_str(), std::ios::in | std::ios::binary); -		file >> poly; -		file.close(); -		 -		p = createPolySetFromPolyhedron(poly); +		if (!file.good()) { +			PRINTB("WARNING: Can't open import file '%s'.", this->filename); +		} +		else { +			file >> poly; +			file.close(); +			 +			p = createPolySetFromPolyhedron(poly); +		}  #else    PRINT("WARNING: OFF import requires CGAL.");  #endif | 
