diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index d71b0ff71dac7da7b3b55debdf944470e000bef8..05689e94f56b26f12960f6908fd4d999707f25b3 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -326,9 +326,10 @@ void MElement::signedInvCondNumRange(double &iCNMin, double &iCNMax, GEntity *ge
 
 void MElement::signedInvGradErrorRange(double &minSIGE, double &maxSIGE)
 {
+#if defined(HAVE_MESH)
   jacobianBasedQuality::sampleIGEMeasure(this, getPolynomialOrder(),
                                          minSIGE, maxSIGE);
-  return;
+#endif
 }
 
 void MElement::getNode(int num, double &u, double &v, double &w) const