Dont crash on wrong command line options

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@354 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2010-12-21 08:51:45 +00:00
parent 465fad1aff
commit 8e7e265d89

View File

@@ -53,6 +53,11 @@ int main(int argc, char **argv)
{
MyMesh mesh;
if ( argc != 2 ) {
std::cerr << "Please specify input filename only!" << std::endl;
return 1;
}
// read mesh from argv[1]
if ( !OpenMesh::IO::read_mesh(mesh, argv[1]) )
{