From ae741582f87033d1377c1b80192b569f36ede0f5 Mon Sep 17 00:00:00 2001
From: Karsten Rink <karsten.rink@ufz.de>
Date: Tue, 12 Nov 2013 15:43:26 +0100
Subject: [PATCH] fixed an issue where geomapper would crash if a 2d-mesh
 contained line elements

---
 Gui/DataView/GeoMapper.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Gui/DataView/GeoMapper.cpp b/Gui/DataView/GeoMapper.cpp
index bd65504158e..d06e8fc7f58 100644
--- a/Gui/DataView/GeoMapper.cpp
+++ b/Gui/DataView/GeoMapper.cpp
@@ -152,7 +152,7 @@ double GeoMapper::getMeshElevation(double x, double y, double min_val, double ma
 
 	for (std::size_t i=0; i<elements.size(); ++i)
 	{
-		if (intersection==nullptr)
+		if (intersection==nullptr && elements[i]->getGeomType() != MeshElemType::LINE)
 			intersection=GeoLib::triangleLineIntersection(*elements[i]->getNode(0), *elements[i]->getNode(1), *elements[i]->getNode(2), GeoLib::Point(x,y,max_val), GeoLib::Point(x,y,min_val));
 		if (intersection==nullptr && elements[i]->getGeomType() == MeshElemType::QUAD)
 			intersection=GeoLib::triangleLineIntersection(*elements[i]->getNode(0), *elements[i]->getNode(2), *elements[i]->getNode(3), GeoLib::Point(x,y,max_val), GeoLib::Point(x,y,min_val));
-- 
GitLab