diff --git a/Applications/FileIO/Gmsh/GMSHPolygonTree.cpp b/Applications/FileIO/Gmsh/GMSHPolygonTree.cpp
index db5b2124b14db4f12f788856f1fc6065987b135b..9f8755ca4726495a89fc0cbc33c1d1cedf418aab 100644
--- a/Applications/FileIO/Gmsh/GMSHPolygonTree.cpp
+++ b/Applications/FileIO/Gmsh/GMSHPolygonTree.cpp
@@ -499,7 +499,8 @@ void GMSHPolygonTree::getPointsFromSubPolygons(
 {
     for (auto const* child : *this)
     {
-        dynamic_cast<GMSHPolygonTree*>(child)->getPointsFromSubPolygons(pnts);
+        dynamic_cast<GMSHPolygonTree const*>(child)->getPointsFromSubPolygons(
+            pnts);
     }
 }
 
@@ -514,8 +515,8 @@ void GMSHPolygonTree::getStationsInsideSubPolygons(
 
     for (auto const* child : *this)
     {
-        dynamic_cast<GMSHPolygonTree*>(child)->getStationsInsideSubPolygons(
-            stations);
+        dynamic_cast<GMSHPolygonTree const*>(child)
+            ->getStationsInsideSubPolygons(stations);
     }
 }