Salome HOME
[bos #26745] EDF 24471 - problem of dumping. Fix SIGSEGV.
authorjfa <jfa@opencascade.com>
Wed, 8 Dec 2021 07:23:52 +0000 (10:23 +0300)
committerjfa <jfa@opencascade.com>
Wed, 8 Dec 2021 07:23:52 +0000 (10:23 +0300)
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 =