From 78d3d7d67656766a48c76f20bfe38a4e65b4948a Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Tue, 30 Apr 2019 09:44:57 +0200
Subject: [PATCH] [A/U/MGTL] constructMeshesFromGeometry: Improve output.

---
 .../Utils/MeshGeoTools/constructMeshesFromGeometry.cpp   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp b/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp
index c3a5d75fe3e..d370b79c999 100644
--- a/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp
+++ b/Applications/Utils/MeshGeoTools/constructMeshesFromGeometry.cpp
@@ -104,10 +104,15 @@ int main(int argc, char* argv[])
             ERR("Could not create a mesh for each given geometry.");
             return EXIT_FAILURE;
         }
-        if (!m_ptr->getNodes().empty())
+        if (m_ptr->getNodes().empty())
         {
-            MeshLib::IO::writeMeshToFile(*m_ptr, m_ptr->getName() + ".vtu");
+            WARN(
+                "The created mesh '%s' hasn't any nodes or elements and thus "
+                "it isn't written to file.",
+                m_ptr->getName().c_str());
+            continue;
         }
+        MeshLib::IO::writeMeshToFile(*m_ptr, m_ptr->getName() + ".vtu");
     }
 
     return EXIT_SUCCESS;
-- 
GitLab