From: eap Date: Wed, 6 Mar 2013 16:03:18 +0000 (+0000) Subject: def FindHypothesis (self, hypname, args, CompareMethod, smeshpyD): X-Git-Tag: pluginMGCleaner~61 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=77f09a6ae5b05b386bb034a0a5ce6f48e478e391;p=modules%2Fsmesh.git def FindHypothesis (self, hypname, args, CompareMethod, smeshpyD): study = smeshpyD.GetCurrentStudy() + if not study: return None scomp = study.FindComponent(smeshpyD.ComponentDataType()) --- diff --git a/src/SMESH_SWIG/smesh_algorithm.py b/src/SMESH_SWIG/smesh_algorithm.py index 9b3acf00d..e71c3c631 100644 --- a/src/SMESH_SWIG/smesh_algorithm.py +++ b/src/SMESH_SWIG/smesh_algorithm.py @@ -71,6 +71,7 @@ class Mesh_Algorithm: # @return SMESH.SMESH_Hypothesis def FindHypothesis (self, hypname, args, CompareMethod, smeshpyD): study = smeshpyD.GetCurrentStudy() + if not study: return None #to do: find component by smeshpyD object, not by its data type scomp = study.FindComponent(smeshpyD.ComponentDataType()) if scomp is not None: