Salome HOME
Fix for the unit-tests that use not HighAPI pythion interface to create construction...
[modules/shaper.git] / src / Model / Model_Expression.cpp
index 4a129757aa406bf8625598c93fb59d69e54d4a0c..2696e6c2d75f0dc8ec7ea8e538c1403dcf58a8b6 100644 (file)
@@ -118,7 +118,7 @@ void Model_ExpressionDouble::setValue(const double theValue)
 
 double Model_ExpressionDouble::value()
 {
-  if (myIsInitialized)
+  if (myIsInitialized && !myReal.IsNull())
     return myReal->Get();
   return std::numeric_limits<double>::max(); // error
 }
@@ -166,7 +166,7 @@ void Model_ExpressionInteger::setValue(const int theValue)
 
 int Model_ExpressionInteger::value()
 {
-  if (myIsInitialized)
+  if (myIsInitialized && !myInteger.IsNull())
     return myInteger->Get();
   return std::numeric_limits<int>::max(); // error
 }