Salome HOME
Check for null object was added. V7_2_0rc1
authorakl <akl@opencascade.com>
Mon, 22 Apr 2013 10:37:55 +0000 (10:37 +0000)
committerakl <akl@opencascade.com>
Mon, 22 Apr 2013 10:37:55 +0000 (10:37 +0000)
src/SMESH_SWIG/smeshBuilder.py

index 78089201d2099facc7cdee6f100b041a1380e2c9..7028f073195510bbab4f9bfd46b2d8bfe08ef147 100644 (file)
@@ -1503,6 +1503,8 @@ class Mesh:
     #  @return SMESH.Hypothesis_Status
     #  @ingroup l2_hypotheses
     def RemoveHypothesis(self, hyp, geom=0):
     #  @return SMESH.Hypothesis_Status
     #  @ingroup l2_hypotheses
     def RemoveHypothesis(self, hyp, geom=0):
+        if not hyp:
+            return None
         if isinstance( hyp, Mesh_Algorithm ):
             hyp = hyp.GetAlgorithm()
             pass
         if isinstance( hyp, Mesh_Algorithm ):
             hyp = hyp.GetAlgorithm()
             pass