]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModelHighAPI/ModelHighAPI_Selection.cpp
Salome HOME
[bos #26745] EDF 24471 - problem of dumping. Fix SIGSEGV.
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Selection.cpp
index 3b45898cdc9cbef594502ea371f7e3193bff3abd..6c80257386eede809c6bb64829b64d2278d031e4 100644 (file)
@@ -235,7 +235,7 @@ void ModelHighAPI_Selection::setColor(int theRed, int theGreen, int theBlue, boo
 
 void ModelHighAPI_Selection::setDeflection(double theValue)
 {
-  if (myVariantType != VT_ResultSubShapePair)
+  if (myVariantType != VT_ResultSubShapePair || !myResultSubShapePair.first.get())
     return;
 
   AttributeDoublePtr aDeflectionAttr =
@@ -247,7 +247,7 @@ void ModelHighAPI_Selection::setDeflection(double theValue)
 // LCOV_EXCL_START
 void ModelHighAPI_Selection::setTransparency(double theValue)
 {
-  if (myVariantType != VT_ResultSubShapePair)
+  if (myVariantType != VT_ResultSubShapePair || !myResultSubShapePair.first.get())
     return;
 
   AttributeDoublePtr aTransparencyAttr =