diff --git a/Solver/function.cpp b/Solver/function.cpp
index 0fd8d52fa380a7d28346b9bec6c56e21e019d0b6..1d288617f25f63a40059c8d14d6c9561948ff245 100644
--- a/Solver/function.cpp
+++ b/Solver/function.cpp
@@ -345,6 +345,8 @@ dataCacheMap::~dataCacheMap()
 
 void dataCacheMap::setNbEvaluationPoints(int nbEvaluationPoints) 
 {
+  if (_nbEvaluationPoints == nbEvaluationPoints)
+    return;
   _nbEvaluationPoints = nbEvaluationPoints;
   for(std::set<dataCacheDouble*>::iterator it = _allDataCaches.begin();
       it != _allDataCaches.end(); it++){